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

Reply via email to