Unit testing of the GUI is not the same as unit testing through the GUI. We are interested in the logic of the GUI rather than the placement and order of the GUI widgets on screen.
Here are three examples of avoiding those, one for each of the check box, drop down and radio group controls.
The examples are “canned” in that the demonstration of them is packed as a web application.
The source is available at github: http://github.com/perty/wicket-test-examples.
The idea is that download the source, then run “mvn install” followed by “mvn jetty:run”.
Can’t be bothered?
Well, the short version is: there are different approaches you must take for each of the check box, drop down and radio group controls when you test them. Furthermore, you want to asure two things when testing Wicket with AJAX; assert that correct components are added and that the markup identity is set.
Now, off you go and download the code! 🙂