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



On 7/2/07, Marc Guillemot <[EMAIL PROTECTED]> wrote:
Hi Acc,

which version of WebTest do you use? With which version of htmlUnit?
It's possible that keyDown doesn't exist in this version (I don't
remember when it has been added)

Marc.

PS: Groovy is nicer that javascript! ;-)

Acc Mera wrote:
> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
>> > [mailto:[EMAIL PROTECTED] Behalf Of Acc Mera
>> > Sent: Donnerstag, 28. Juni 2007 3:25
>> > To: [email protected]
>> > 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
>> > [email protected]
>> > http://lists.canoo.com/mailman/listinfo/webtest
>>
>>
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
>

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

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

Reply via email to