[Webtest] How to invoke Javascript from canoo?

Brandon Moore webtest@lists.canoo.com
Mon, 30 Jun 2003 11:04:43 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C33EF7.6A4CAD00
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

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

------=_NextPart_000_0000_01C33EF7.6A4CAD00
Content-Type: application/ms-tnef;
	name="winm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