Assuming you already done
WicketTester tester = new WicketTester(); tester.startPage(PageContainingRadioButton.class);
or a similar startPanel
(Wicket 1.4) or startComponent
(Wicket 1.5), so your test selects a page containing a button, in a known way, you should be able to get WicketTester to mimic ajax behavior with something like
tester.executeAjaxEvent("blabla:form:selectPageRadioGroup:radioButton1", "onclick");
(Of course, you will need to adjust this path.)
and then make sure he did the right thing with
tester.assertRenderedPage(MyWebPage.class);
source share