cruiserdude wrote: > > Hi, > > Bit of a noob question but I was hoping somebody might be able to give an > example of unit testing a Wizard, I'm not entirely sure how to test the > individual pages. > > So far I've got to the point that I can check that my child of > Wizard.class has rendered but every time I try and check that a particular > component has been rendered I get "Path xx.xx.xx does not exist for page : > WizardPage > > I have googled and searched the forum but I haven't been able to come up > with much. Any suggestions or examples would be most appreciated. > > Thanks > cruiserdude >
If you are asking for org.apache.wicket.extensions.wizard.Wizard it may be caused because your components are nested inside other containers in the Wizard class so you have to go through the whole hierarchy. For example: "YourWizard:form:view:yourComponent" try this code: WicketTester wt = new WicketTester(); wt.startPage(YourPage.class); WebMarkupContainer container = (WebMarkupContainer) wt.getComponentFromLastRenderedPage("YourWizardStringId:form:view"); Iterator it = container.iterator(); while (it.hasNext()) { System.out.println(it.next()); } -- View this message in context: http://www.nabble.com/Unit-testing-wizards-tp12123025p16467532.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]