On Mon, Oct 6, 2008 at 3:11 PM, Aleksandr Nikiforov
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a couple of DropDownChoices  and I want to test their behaviour using
> WicketTester,
> is it possible to somehow simulate that user has made selection in ddc?

WicketTester tester = ...;

// If ajax drop down choice
tester.setParameterForNextRequest("path:to:ddc", itemIndex );
tester.setupRequestAndResponse(true);
tester.executeAjaxEvent("path:to:ddc", "onchange");

// Normal drop down choice
FormTester formTester = tester.newFormTester( "path:to:form" );
formTester.select( "path:to:ddc", itemIndex );
formTester.submit();

Regards,
Edward Yakop

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to