[Webtest] Problem with clicklink.

Brandon Moore webtest@lists.canoo.com
Fri, 1 Aug 2003 13:55:33 -0500


I had trouble with this too. In build 284 I could fix it by
modifying the clicklink test step to use WebLink.click() rather
than pulling the URL out of the WebLink object. For some reason
webtest keeps form parameters in a dictionary rather than setting
them on the WebForm object, so you need to unpack the dictionary
before calling click(). There is code for doing this in clickbutton.
I don't know what responsibilites an action has, so I probably
missed something. I haven't looked at any of the newer builds, but
you could probably do something similar if you didn't mind rebuilding
the code.

Brandon

-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Aatish Arora
Sent: Friday, August 01, 2003 4:38 AM
To: webtest@lists.canoo.com
Subject: Re: [Webtest] Problem with clicklink.


Hi Dilip,

I dont think Javascript on clicklink is yet supported
- atleast wasnt till some time back

Cheers!
Aatish

--- Dilip N Palukuri <ndilip@merindus.com> wrote:
> Hello Techies,
> 
> I've got stuck trying to submit a form that relies
> on JavaScript for
> submission. I am using clicklink to submitt the form
> (Code follows)
> 
> <clicklink stepid="Follow the link to the next page"
>             label=""
>             save="myResultPage"
>             href="javascript:loadFrms();"/>
> 
> 
>   
> Build was successfull with the following message
> 
> [testSpec] Start Step: Follow the link to the next
> page" (5/7)
> [testSpec] -> gotoTarget(by url):
> javascript:loadFrms();
> [testSpec] Completed Step: Follow the link to the
> next page" (5/7)
> [testSpec] Start Step: Home Page follows if login
> success" (6/7)
> [testSpec] Completed Step: Home Page follows if
> login success" (6/7)
> [testSpec] Start Step: [implicit tear down step]"
> (7/7)
> [testSpec] Completed Step: [implicit tear down
> step]" (7/7)
> [testSpec] Report class:
> com.canoo.webtest.reporting.XmlReporter
> 
> the results page shows the same page where hyperlink
> exists insted of next
> page. Following is the relavent part of script, the
> link I tried to click is
> highlighted.
> 
> 
> <script language="javascript">
> <body
>
onload="javascript:document.forms[0].elements[0].focus();">
> <form name="frmLogin">
> ....
> .....
> .......
> .........
> 
>        <td colspan="2"
> background="images/loginbox_btnbg.jpg" width="305"
> height="31" align="center"><a
> href="javascript:loadFrms();"><img src=
> images/login_btn.gif" border="0"></a>&nbsp;&nbsp;<a
> href=
>
javascript:document.forms[0].reset();document.forms[0].elements[0].focus();
> ><img src="images/reset_btn.gif"
> border="0"></a></td>
>        
> 
> Shall be looking for help
> 
> Thanks
> 
> Dilip


=====
========================
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.
========================

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest