I use junit to assert the existing of wicket components:
wicketTester.assertComponent("dev1WicketId:dev2WicketId:formWicketId", Form.class);
This works for some forms. For complex structure, it is defficult to find out the path of the form by searching all html files. Is there any method how to find out the path easy?
If you have the component you can call
#getPageRelativePath(). E.g.You can get the children of a markup container by using the
visitChildren()method. The following example shows how to get all theForms from a page.