Perhaps there is a smarter way, but something like this should work:
DropDownChoice ddc = (DropDownChoice)
wicketTester.getComponentFromLastRenderedPage("path:to:dropDownChoice");
List choices = ddc.getChoices().
do assertions on choices.
Lars
On Fri, Mar 14, 2008 at 5:09 AM, Ricky <[EMAIL PROTECTED]> wrote:
> I need to test drop down values in a list using WicketTester ... like is
> there wicketTester.assertXXX or something that i could use ? I tried
> getTagByWicketId("some_thing_").getValue() but it only gives me the HTML
> for
> it ...
>
> my drop down is something like
>
> add(dChoice = new DropDownChoice("someModelClassChoice",new
> CompoundPropertyModel(SomeModelClass.class),
> Arrays.<String>asList("MODEL0","MODEL1","MODEL2")){
>
> @Override
> protected boolean wantOnSelectionChangedNotifications() {
> return true;
>
> }
>
> @Override
> protected void onSelectionChanged(Object newSelection) {
> System.out.println(" Something happened");
> params.put("Selected", newSelection);
> setResponsePage(new WelcomePage(params));
>
> }
> });
>
> My apologies if the question is a little dumb ...
>
> Regards
> Vyas, Anirudh
> || ॐ ||
>