[Webtest] How to invoke Javascript from canoo?

Thakkar, Hetal webtest@lists.canoo.com
Mon, 30 Jun 2003 17:19:56 -0400


No, this is not a work arround for Unicode characters. I usually use
"verifyxpath" with regular expressions. This means that the testcases
more lenient, but I think that works for my case.

Hetal

-----Original Message-----
From: Aatish Arora [mailto:a_aatish@yahoo.com]
Sent: Monday, June 30, 2003 11:40 AM
To: webtest@gate.canoo.com
Subject: RE: [Webtest] How to invoke Javascript from canoo?


I dont think Canoo supports Unicode entirely  - ive
had pelnty of problems during a trial run. I tried it
out with some Hebrew stuff - but it just refused to
work. If there is a way do let me know too!

Cheers!
Aatish

--- "Thakkar, Hetal" <hetal.thakkar@citigroup.com>
wrote:
> Hi Brandon,
>=20
> When I use "" as label of link then the test runs
> without any error, but this function
> "SubmitWithDisclosure" is supposed to update a
> database, which is not being done, so I don't think
> it is invoked.
> When I use "Submit" or " Submit " as label of the
> link then I get link not found error.
> The xpath returns "\u00A0Submit\u00A0", which is
> unicode for "A!SubmitA!", I tried using that and I
> get the same link not found error with text
> "AYSubmitAY". I think the problem here is that for
> some reason when I put "A!" in my tests it is
> changed to "AY" when comparing, so it does not work.
>=20
> Thanks for your reply,
> Hetal
>=20
>=20
> -----Original Message-----
> From: Brandon Moore [mailto:bmoore@commcode.com]
> Sent: Monday, June 30, 2003 9:05 AM
> To: webtest@gate.canoo.com
> Subject: RE: [Webtest] How to invoke Javascript from
> canoo?
>=20
>=20
> Looking through the code, I think canoo misses the
> onclick handler.
> (Canoo uses WebLink.getRequest(), rather then
> WebLink.click()).
> HttpUnit (or at least jWebUnit) seems to handle
> onclick and
> a "u"ri of the form javascript:stuff(). I'm going to
> try changing
> canoo to use WebLink.click() rather than pulling the
> URL off
> WebLink.getRequest().
>=20
> What exactly do you mean by "Doesn't work"? If canoo
> isn't finding
> the link I would try the exact text as reported by
> XPath explorer
> (probably " Submit "). Is the javascript failing? If
> you are
> getting a NoClassDefFound (maybe for
> Javascript$Form?) it's probably
> a bug I've been seeing.
>=20
> Brandon
>=20
> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of
> Thakkar, Hetal
> Sent: Friday, June 27, 2003 6:54 PM
> To: webtest@gate.canoo.com
> Subject: [Webtest] How to invoke Javascript from
> canoo?
>=20
>=20
> Hi all,
>=20
> I have the followig html code and I want to invoke
> the javascript
> function invoked by "OnClick".
>=20
> <tr>
>     <td nowrap align=3Dleft>&nbsp;</td>
>     <td width=3D"90%" align=3Dright>
>         <a class=3Dcmd href=3D'' LANGUAGE=3D"javascript"
> onclick=3D"SubmitWithDisclosure('Update',
>
'http://alert10.alert2000.cdcla.com/portalsim/gecdredirection.asp');
> return false">
>             <img src=3D"images/btnLeft.gif" border=3D0
> align=3Dtop>
>             &nbsp;Submit&nbsp;
>             <img src=3D"images/btnRight.gif" border=3D0
> align=3Dtop>
>         </a>=20
>         &nbsp;
>      </td>
>  </tr>
>=20
> From the discussion board, I found a post that
> suggested to do the
> following, I also tried it with label=3D"Submit":
> <clicklink label=3D""
> href=3D"javascript:SubmitWithDisclosure('Update',
>
'http://alert10.alert2000.cdcla.com/portalsim/gecdredirection.asp');
> return false;"/>
>=20
> But this does not work, does anyone have any other
> ideas?
>=20
> Thanks,
> Hetal
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> YaeOzEfj)bz
b2Ozm7??X??C=1AzS=1Cchm?Yy-+-?AE?c?(>usSYsYub2O?~??y>^2


=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
THE FOUR STAGES OF LIFE:

1) You believe in Santa Claus.
2) You don't believe in Santa Claus.
3) You are Santa Claus.
4) You look like Santa Claus.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest