I try to use the PageTester, my first test is very simple on a login page,
but when I try to submit a form I get this error message

java.lang.RuntimeException: Path 'login.loginform' does not start with
context path '/foo'.
        at
org.apache.tapestry5.test.PageTester.stripContextFromPath(PageTester.java:320)
        at org.apache.tapestry5.test.PageTester.submitForm(PageTester.java:340)
        at com.astro.website.tapestry.bo.LoginTest.simple(LoginTest.java:26)

I searched and this contextPath '/foo' is the default one in the
TestableRequestImpl. I don't understand how to change it from my test

my page Login is present in the folder /bo and the login form is named
"loginForm", the code of the test is the next one

PageTester tester = new PageTester("com.astro.website", "App");
Document document = tester.renderPage("bo/Login/");

Map < String, String > formValues = new HashMap < String, String >();
formValues.put("loginFld", "fake login");
formValues.put("passFld", "fake pass");
document = tester.submitForm(document.getElementById("loginForm"),
formValues);

thanks a lot if you can help me

Jerome
-- 
View this message in context: 
http://www.nabble.com/PageTester-use-the-foo-contextPath-tp23670140p23670140.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to