You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Aleksandr Nikiforov <al...@quretec.com> on 2008/10/06 09:11:53 UTC

Simulate DropDownChoice selection

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?

Regards,
Aleksandr

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Simulate DropDownChoice selection

Posted by Edward Yakop <ed...@gmail.com>.
On Mon, Oct 6, 2008 at 3:11 PM, Aleksandr Nikiforov
<al...@quretec.com> 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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Simulate DropDownChoice selection

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
use form tester...

Aleksandr Nikiforov 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?
>
> Regards,
> Aleksandr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org