6 messages in com.canoo.lists.webtestRe: [Webtest] Using javascript with c...| From | Sent On | Attachments |
|---|---|---|
| Acc Mera | 27 Jun 2007 18:24 | |
| Dierk Koenig | 28 Jun 2007 02:18 | |
| Acc Mera | 28 Jun 2007 17:33 | |
| Marc Guillemot | 02 Jul 2007 02:22 | |
| Acc Mera | 02 Jul 2007 16:54 | |
| Marc Guillemot | 03 Jul 2007 05:10 |
| Subject: | Re: [Webtest] Using javascript with canoo Webtest for simulating keyDown![]() |
|---|---|
| From: | Acc Mera (acc....@gmail.com) |
| Date: | 06/28/2007 05:33:24 PM |
| List: | com.canoo.lists.webtest |
Hi Dierk,
Thanks for your kind response. item.keyDown(13); is not a functions in the HTML page under test.
Any idea why it is not able to find function keyDown? : Error invoking script: org.mozilla.javascript.EcmaError: TypeError: Cannot find function keyDown., Step: Script
- Acc Mera
On 6/28/07, Dierk Koenig <dier...@canoo.com> wrote:
from http://webtest.canoo.com/webtest/manual/scriptStep.html
"Note: although scriptStep does support JavaScript, at the moment, it doesn't provide the mechanism to call JavaScript functions in your HTML pages under test."
Dierk
-----Original Message----- From: webt...@lists.canoo.com [mailto:webt...@lists.canoo.com]On Behalf Of Acc Mera Sent: Donnerstag, 28. Juni 2007 3:25 To: webt...@lists.canoo.com Subject: [Webtest] Using javascript with canoo Webtest for simulating keyDown
Hi,
I am trying to use <scriptStep language="javascript"> with Canoo to simulate keyboard Enter key press, but stuck :(
What is the correct way to do this?
Here is the code used and the error detail:
.... <setInputField description="enter text" name="name" value="#{yourname}"/>
<scriptStep language="javascript"> item = document.getOneHtmlElementByAttribute('input', 'name', 'name'); item.keyDown(13); </scriptStep> ....
This gives error message FAIL at com.canoo.webtest.engine.StepExecutionException: Error invoking script: org.mozilla.javascript.EcmaError: TypeError: Cannot find function keyDown., Step: Script
All ideas/suggestions are welcome.
Thanks Acc Mera
_______________________________________________ WebTest mailing list WebT...@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest




