1 message in com.canoo.lists.webtestRE: [Webtest] Canoo v1.6 build 544 (h...
FromSent OnAttachments
Erskine, Chris13 Dec 2004 14:14 
Subject:RE: [Webtest] Canoo v1.6 build 544 (httpunit 1.6) Javascript Supp ort?
From:Erskine, Chris (chri@eds.com)
Date:12/13/2004 02:14:14 PM
List:com.canoo.lists.webtest

Quick one, you do not have a button on the form to click. What you have are 2 different images.

Chris Erskine

EDS Consulting Services F5-EDS-001 2424 Garden of the Gods Rd Colorado Springs, CO 80919

Phone: 719-535-6064

_____

From: webt@gate2.canoo.com [mailto:webt@gate2.canoo.com] On Behalf Of rxh@regence.com Sent: Monday, December 13, 2004 3:08 PM To: webt@gate2.canoo.com Subject: Re: [Webtest] Canoo v1.6 build 544 (httpunit 1.6) Javascript Support?

Hi Lisa, I upgraded my Canoo version and build to version 1.7, build 583 using htmlunit and it still is unable to find the button.

I looked on the webtest-communit site and found this:

http://webtest-community.canoo.com/wiki/space/Javascript "identification methods other than by 'htmlid' (i.e. 'name','label') need a <form> tag around it. See mailinglist."

It references an email on the list, which is authored by you, but it doen't look like it applies to my situation.

I have the <form> tags around the button (see example further down this email correspondence), but it still doesn't work.

I'm not familiar with the "htmlid". Is this an attribute that is embedded in the html? Do you have an example of its use?

Thanks,

lisa@att.net Sent by: webt@lists.canoo.com

12/13/2004 12:56 PM Please respond to webtest

To: webt@lists.canoo.com cc: Subject: Re: [Webtest] Canoo v1.6 build 544 (httpunit 1.6) Javascript Support?

I don't know with which build number WebTest started to be based on HtmlUnit, but I would think you need the HtmlUnit-based WebTest to work with the Javascript.

Also, I think you need to use the value, Htmlid or name attribute for clickbutton to find the button, I dunno about using that alt attribute. (I am clearly not an expert at this).

We've gone ahead and added Htmlid to all our links and buttons, and it makes life much easier for WebTest scripts. -- Lisa

-------------- Original message from rxh@regence.com: --------------

Hi, I using Canoo v1.6 build 544 with httpunit 1.6, and I'm trying to use the 'clickbutton' test step to click a button that uses the 'onClick' javascript. I've been unable to use clickbutton to locate and submit the form. Can anyone point out what I'm doing wrong? Does Canoo need to be configured for javascript use?

Thanks, Richard

------------- Html Src: ------------- <form method="post" action="" name="MemberUserAgreementForm">

<input type="Hidden" name="USER_ACCEPTANCE_NAME_PARAMETER_KEY" value="MEMBER-MYCO"> <input type="Hidden" name="USER_ACCEPTANCE_VERSION_PARAMETER_KEY" value="1"> <input type="Hidden" name="USER_ACCEPTANCE_RELEASE_PARAMETER_KEY" value="1">

<input type="image" src="../images/buttonAgree.gif" alt="I Agree" border="0"

onclick="form.action='https://ros-uat.myco.com/member/or/register.do?action= acceptAgreement'">

&nbsp;&nbsp;

<input type="image" src="../images/buttonDisagree.gif" alt="I Disagree" border="0"

onClick="form.action='register?jadeAction=USER_AGREEMENT_REJECTED_ACTION'"> </form>

--------------- Test Step: --------------- <clickbutton stepid="Click 'Agree' button" label="I Agree"> <form name="MemberUserAgreementForm" /> </clickbutton>

----------------------- Error Message: -----------------------

com.canoo.webtest.engine.StepFailedException: Button with name <<not specified>> and value <I Agree> not found!, Step: ClickButton at file:C:/Development/sandbox/canoo_1.6-544/tests/rosm/bvt/Register.xml:36: with (label="I Agree", step Id="Click &apos;Agree&apos; button", stepType="clickbutton")