[Webtest] Using javascript with canoo Webtest for simulating keyDown

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Tue, 03 Jul 2007 14:10:47 +0200


Hi,

something like

<groovy>
step.context.currentResponse.getHtmlElementById('yourId').keyDown(13)
</groovy>

should work (when the version of HtmlUnit you use already has keyDown(int))

No classpath needs to be set.

Marc.

Acc Mera wrote:
> Thanks Marc, I too would like to use Groovy and I agree with your
> comment on it....
> However I am not able to use keyDown(13) :(
> 
> What should be the correct usage of this?
> 
> <groovy description="Press Return Key" >
>     <what should come here?> keyDown(13)
> </groovy>
> 
> Do I have to add class pathetc to use Groovy with WebTest?
> Any links for Groovy with WebTest examples
> 
> Thanks so much for your attention,
> Acc Mera