I'm using webtest 3.0. After the enter press AJAX is suppose to return a
transparent panel with a list of items (it's a search button, and there's no
url change).

Is there another method that would be useful in simulating the 'enter' in
webtest then? I've been looking through the htmlunit documentation and
hasn't found any...

Thanks,

- Dai



Marc Guillemot wrote:
> 
> Hi,
> 
> which WebTest version do you use? What do you expect after the enter
> press?
> 
> The <scriptStep language="javascript"> allows you to script WebTest, not 
> (directly) to inject JavaScript into the page.
> 
> Cheers,
> Marc.
> -- 
> Blog: http://mguillem.wordpress.com
> 
> dave.y wrote:
>> 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
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Simulating-the-enter-key-press-tp27312011p27358776.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