Hi all,

I ran into a problem with WicketTester. I am doing a very simple test of
the login form of my application:

<code>
.. setup stuff ...

tester.startPage(LoginPage.class);
tester.assertComponent("form:loginName", TextField.class);
FormTester loginFormTester = tester.newFormTester("form");
loginFormTester.setValue("loginName", testUser.getUsername());
loginFormTester.setValue("password", "test");
tester.clickLink("form:loginSubmit");
tester.assertRenderedPage(DashboardPage.class);

</code>

The form is a standard wicket form object with 1 Textfield, 1
PasswordTextField for username and password, 2 buttons that use
SubmitLinks, and a FeedbackPanel.

I get the following error when submitting the form. I have no idea where
that '/' comes from, but its obviously causing the problem.
I also tried to use formtester.submit("loginSubmit") with the same results.

Any suggestions?



BR,
Stephan

org.apache.wicket.WicketRuntimeException: Internal error parsing
wicket:interface = :0:form::IFormSubmitListener::/; wrong format for url
depth argument. Expected a number but was '/'
        at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:617)
        at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:554)
        at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:199)
        at org.apache.wicket.Request.getRequestParameters(Request.java:171)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1233)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
        at
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:484)
        at
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:472)
        at
org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:248)
        at
org.apache.wicket.util.tester.BaseWicketTester.submitForm(BaseWicketTester.java:791)
        at
org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:741)
        at
org.apache.wicket.util.tester.BaseWicketTester.clickLink(BaseWicketTester.java:617)
        at
com.xxx.xxx.wicket.pages.AllPagesInstantiationTest.testAllPagesFromMainMenu(AllPagesInstantiationTest.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
        at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.NumberFormatException: For input string: "/"
        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:447)
        at java.lang.Integer.parseInt(Integer.java:497)
        at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:613)
        ... 30 more


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to