Hi Mathilde,

maybe the form id you use in test is not correct. How do you add form to modalWindow? Can you attach code?



Hi all,

I have a modal window with a login form inside that works fine when I test
it manually.
I try to test it with wicket tester since yesterday. I saw in some mails of
this list that "there is nothing special in testing modal windows".
I tried this :

         tester.startPage(AccueilPage.class);
         tester.clickLink("connexion");

         ModalWindowE4N modalWindow = (ModalWindowE4N)
tester.getComponentFromLastRenderedPage("modalConnexion");
         tester.isVisible(modalWindow.getPageRelativePath() + ":" +
modalWindow.getContentId());

         Form<?>  loginForm = (Form<?>) modalWindow.get("loginForm");
         Component feedbackPanel = modalWindow.get("errorMsg");

         FormTester formTester =
tester.newFormTester(loginForm.getPageRelativePath() + ":" +
loginForm.getId());

but I have a java.lang.NullPointerException on loginForm (and feedbackPanel
is also null).
I begin with Wiket and I really don't understand why it doesn't work.
What am I doing wrong?

Thanks
Mathilde



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

Reply via email to