[Webtest] design

Brandon Moore webtest@lists.canoo.com
Mon, 30 Jun 2003 14:54:40 -0500


I've been looking through the canoo internals trying to
solve a problem I've had with javascript, and I'm wondering
what the parameters accumlated in the context are for. They
seem to be used in clickbutton to set the form elements, but
why doesn't the code set the parameters directly on the
WebForm? This also seems likely to break javascript code that
expects to manipulate form values (the form is populated from
the map in clickbutton, so things work there, but if you were
trying to test an onmouseover handler or something you might
have problems). Is there any good reason for doing things this
way?

Brandon

-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Aatish Arora
Sent: Monday, June 30, 2003 1:40 PM
To: webtest@lists.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,
>
> 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 "C!SubmitC!", I tried using that and I
> get the same link not found error with text
> "CSubmitC". I think the problem here is that for
> some reason when I put "C!" in my tests it is
> changed to "C" when comparing, so it does not work.
>
> Thanks for your reply,
> Hetal
>
>
> -----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?
>
>
> 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().
>
> 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.
>
> Brandon
>
> -----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?
>
>
> Hi all,
>
> I have the followig html code and I want to invoke
> the javascript
> function invoked by "OnClick".
>
> <tr>
>     <td nowrap align=left>&nbsp;</td>
>     <td width="90%" align=right>
>         <a class=cmd href='' LANGUAGE="javascript"
> onclick="SubmitWithDisclosure('Update',
>
'http://alert10.alert2000.cdcla.com/portalsim/gecdredirection.asp');
> return false">
>             <img src="images/btnLeft.gif" border=0
> align=top>
>             &nbsp;Submit&nbsp;
>             <img src="images/btnRight.gif" border=0
> align=top>
>         </a>
>         &nbsp;
>      </td>
>  </tr>
>
> From the discussion board, I found a post that
> suggested to do the
> following, I also tried it with label="Submit":
> <clicklink label=""
> href="javascript:SubmitWithDisclosure('Update',
>
'http://alert10.alert2000.cdcla.com/portalsim/gecdredirection.asp');
> return false;"/>
>
> But this does not work, does anyone have any other
> ideas?
>
> Thanks,
> Hetal
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> YfSzKfj)b
b2Um7,6X,6G