Hi all, 

I've been trying to simulate an enter press at a website's text input field.
But currently none of my attempts or the suggestions I could find seem to
work.

I've been mostly trying to use the groovy code, for example:
        <groovy>
                step.context.currentResponse.getHtmlElementById("q").keyDown(13)
        </groovy>
        <groovy>
        
step.context.currentResponse.getHtmlElementById("q").doType("\n".charAt(0),
1==0, 1==0, 1==0)
        </groovy>

So far none of these are returning anything for me. The returns should be in
AJAX, but I'm using the easyajax flag with a wait loop, and thus far it's
catching the other AJAX returns from the website fine.
        

I've also tried using javascript (like the following). However since Canoo
is using the garogoylesoftware.htmlunit package the usual methods aren't
working for me.
        <scriptStep language="javascript">
                document.getElementById('search_form').submit()
        </scriptStep> 

Does anyone have any suggestions on what I'm doing wrong or what else I
should try?

Thanks in advance,

Dave
-- 
View this message in context: 
http://old.nabble.com/Simulating-the-enter-key-press-tp27312011p27312011.html
Sent from the WebTest mailing list archive at Nabble.com.

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to