[Webtest] Canoo v1.6 build 544 (httpunit 1.6) Javascript Support?

webtest@lists.canoo.com webtest@lists.canoo.com
Mon, 13 Dec 2004 14:07:54 -0800


This is a multipart message in MIME format.
--=_alternative 0079935B88256F69_=
Content-Type: text/plain;
 charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

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

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')=20
need a <form> tag around it. See  mailinglist."

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

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

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

Thanks,





lisa.crispin@att.net
Sent by: webtest-admin@lists.canoo.com
12/13/2004 12:56 PM
Please respond to webtest


=20
         To:    webtest@lists.canoo.com
        cc:=20
        Subject:        Re: [Webtest] Canoo v1.6 build 544 (httpunit 1.6) =
Javascript Support=3F


I don't know with which build number WebTest started to be based on=20
HtmlUnit, but I would think you need the HtmlUnit-based WebTest to work=20
with the Javascript.=20
=20
Also, I think you need to use the value, Htmlid or name attribute for=20
clickbutton to find the button, I dunno about using that alt attribute. (I=
=20
am clearly not an expert at this).
=20
We've gone ahead and added Htmlid to all our links and buttons, and it=20
makes life much easier for WebTest scripts.
-- Lisa

-------------- Original message from rxhill@regence.com: --------------=20


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

Thanks,=20
Richard=20

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

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

  <input type=3D"image" src=3D"../images/buttonAgree.gif" alt=3D"I Agree"=20
border=3D"0"  =20
=20
onclick=3D"form.action=3D'https://ros-uat.myco.com/member/or/register.do=3F=
action=3DacceptAgreement'">=
=20

                &nbsp;&nbsp;=20

  <input type=3D"image" src=3D"../images/buttonDisagree.gif" alt=3D"I =
Disagree"=20
border=3D"0"=20
=20
onClick=3D"form.action=3D'register=3FjadeAction=3DUSER_AGREEMENT_REJECTED_A=
CTION'">=
=20
</form>=20

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

-----------------------=20
Error Message:=20
-----------------------=20

com.canoo.webtest.engine.StepFailedException: Button with name <<not=20
specified>>=20
and value <I Agree> not found!, Step: ClickButton at =
=66ile:C:/Development/sandbox/canoo_1.6-544/tests/rosm/bvt/Register.xml:36:=
 =
with (label=3D"I Agree", step Id=3D"Click &apos;Agree&apos; button",=20
stepType=3D"clickbutton")=20
=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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
IMPORTANT NOTICE: This communication, including any attachment, contains=20
information that may be confidential or privileged, and is intended solely=
=20
=66or the entity or individual to whom it is addressed. If you are not the=
=20
intended recipient, you should delete this message and are hereby notified=
=20
that any disclosure, copying, or distribution of this message is strictly=20
prohibited. Nothing in this email, including any attachment, is intended=20
to be a legally binding signature.
=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=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=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=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=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=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
IMPORTANT NOTICE: This communication, including any attachment, contains =
information that may be confidential or privileged, and is intended solely =
=66or the entity or individual to whom it is addressed.  If you are not the=
 =
intended recipient, you should delete this message and are hereby notified =
that any disclosure, copying, or distribution of this message is strictly =
prohibited.  Nothing in this email, including any attachment, is intended t=
o=
 be a legally binding signature.
=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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D

--=_alternative 0079935B88256F69_=
Content-Type: text/html;
 charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"sans-serif">Hi Lisa,</font>
<br><font size=3D2 face=3D"sans-serif">I upgraded my Canoo version and buil=
d=
 to version 1.7, build 583 using htmlunit and it still is unable to find th=
e=
 button. </font>
<br>
<br><font size=3D2 face=3D"sans-serif">I looked on the webtest-communit sit=
e=
 and found this:</font>
<br>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; =
http://webtest-community.canoo.com/wiki/space/Javascript</font>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &quot;identification =
methods other than by 'htmlid' (i.e. 'name','label') need a &lt;form&gt; ta=
g=
 around it. See &nbsp;mailinglist.&quot;</font>
<br>
<br><font size=3D2 face=3D"sans-serif">It references an email on the list, =
which is authored by you, but it doen't look like it applies to my =
situation.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">I have the &lt;form&gt; tags around =
the button (see example further down this email correspondence), but it =
still doesn't work. </font>
<br>
<br><font size=3D2 face=3D"sans-serif">I'm not familiar with the =
&quot;htmlid&quot;. Is this an attribute that is embedded in the html=3F Do=
 =
you have an example of its use=3F</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Thanks,</font>
<br>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td>
<td><font size=3D1 face=3D"sans-serif"><b>lisa.crispin@att.net</b></font>
<br><font size=3D1 face=3D"sans-serif">Sent by: =
webtest-admin@lists.canoo.com</font>
<p><font size=3D1 face=3D"sans-serif">12/13/2004 12:56 PM</font>
<br><font size=3D1 face=3D"sans-serif">Please respond to webtest</font>
<br>
<br>
<td><font size=3D1 face=3D"Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;To=
:=
 &nbsp; &nbsp; &nbsp; &nbsp;webtest@lists.canoo.com</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: =
&nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:=
 =
&nbsp; &nbsp; &nbsp; &nbsp;Re: [Webtest] Canoo v1.6 build 544 (httpunit 1.6=
)=
 Javascript Support=3F</font></table>
<br>
<br>
<br><font size=3D3 face=3D"Times New Roman">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. &nbsp;</font>
<br><font size=3D3 face=3D"Times New Roman">&nbsp;</font>
<br><font size=3D3 face=3D"Times New Roman">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. &nbsp;(I am clearly not an expert at =
this).</font>
<br><font size=3D3 face=3D"Times New Roman">&nbsp;</font>
<br><font size=3D3 face=3D"Times New Roman">We've gone ahead and added =
Htmlid to all our links and buttons, and it makes life much easier for =
WebTest scripts.</font>
<br><font size=3D3 face=3D"Times New Roman">-- Lisa</font>
<br>
<br><font size=3D3 face=3D"Times New Roman">-------------- Original message=
 =
=66rom rxhill@regence.com: -------------- <br>
<br>
</font><font size=3D2 face=3D"sans-serif"><br>
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 =
=66orm. Can anyone point out what I'm doing wrong=3F Does Canoo need to be =
configured for javascript use=3F</font><font size=3D3 face=3D"Times New =
Roman"> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
Thanks,</font><font size=3D3 face=3D"Times New Roman"> </font><font size=3D=
2=
 face=3D"sans-serif"><br>
Richard</font><font size=3D3 face=3D"Times New Roman"> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
-------------</font><font size=3D3 face=3D"Times New Roman"> </font><font =
size=3D2 face=3D"sans-serif"><br>
Html Src:</font><font size=3D3 face=3D"Times New Roman"> </font><font =
size=3D2 face=3D"sans-serif"><br>
-------------</font><font size=3D3 face=3D"Times New Roman"> </font><font =
size=3D2 face=3D"sans-serif"><br>
&lt;form method=3D&quot;post&quot; action=3D&quot;&quot; =
name=3D&quot;MemberUserAgreementForm&quot;&gt;</font><font size=3D3 =
=66ace=3D"Times New Roman"> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
 &nbsp;&lt;input type=3D&quot;Hidden&quot; =
name=3D&quot;USER_ACCEPTANCE_NAME_PARAMETER_KEY&quot; =
value=3D&quot;MEMBER-MYCO&quot;&gt;</font><font size=3D3 face=3D"Times New =
Roman"> </font><font size=3D2 face=3D"sans-serif"><br>
 &nbsp;&lt;input type=3D&quot;Hidden&quot; =
name=3D&quot;USER_ACCEPTANCE_VERSION_PARAMETER_KEY&quot; =
value=3D&quot;1&quot;&gt;</font><font size=3D3 face=3D"Times New Roman"> =
</font><font size=3D2 face=3D"sans-serif"><br>
 &nbsp;&lt;input type=3D&quot;Hidden&quot; =
name=3D&quot;USER_ACCEPTANCE_RELEASE_PARAMETER_KEY&quot; =
value=3D&quot;1&quot;&gt;</font><font size=3D3 face=3D"Times New Roman"> =
<br>
</font><font size=3D2 face=3D"sans-serif"><br>
 &nbsp;&lt;input type=3D&quot;image&quot; =
src=3D&quot;../images/buttonAgree.gif&quot; alt=3D&quot;I Agree&quot; =
border=3D&quot;0&quot; &nbsp;</font><font size=3D3 face=3D"Times New Roman"=
>=
 </font><font size=3D2 face=3D"sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
onclick=3D&quot;form.action=3D'https://ros-uat.myco.com/member/or/register.=
do=3Faction=3DacceptAgreement'&quot;&gt;</font><font=
 size=3D3 face=3D"Times New Roman"> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;&amp;nbsp;&amp;nbsp;</font><font size=3D3 face=3D"Times New Roman"> =
<br>
</font><font size=3D2 face=3D"sans-serif"><br>
 &nbsp;&lt;input type=3D&quot;image&quot; =
src=3D&quot;../images/buttonDisagree.gif&quot; alt=3D&quot;I Disagree&quot;=
 =
border=3D&quot;0&quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;onClick=3D&quot;form.action=3D'register=3FjadeAction=3DUSER_AGREEMENT=
_REJECTED_ACTION'&quot;&gt;</font><font=
 size=3D3 face=3D"Times New Roman"> </font><font size=3D2 =
=66ace=3D"sans-serif"><br>
&lt;/form&gt;</font><font size=3D3 face=3D"Times New Roman"> </font>
<br><font size=3D2 face=3D"sans-serif"><br>
---------------</font><font size=3D3 face=3D"Times New Roman"> </font><font=
 =
size=3D2 face=3D"sans-serif"><br>
Test Step:</font><font size=3D3 face=3D"Times New Roman"> </font><font =
size=3D2 face=3D"sans-serif"><br>
---------------</font><font size=3D3 face=3D"Times New Roman"> </font><font=
 =
size=3D2 face=3D"sans-serif"><br>
&lt;clickbutton stepid=3D&quot;Click 'Agree' button&quot;</font><font =
size=3D3 face=3D"Times New Roman"> </font><font size=3D2 =
=66ace=3D"sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; label=3D&quot;I Agree&quot;&gt;</font><font size=3D3 =
=66ace=3D"Times New Roman"> </font><font size=3D2 face=3D"sans-serif"><br>
 &nbsp; &nbsp; &nbsp;&lt;form name=3D&quot;MemberUserAgreementForm&quot; =
/&gt;</font><font size=3D3 face=3D"Times New Roman"> </font><font size=3D2 =
=66ace=3D"sans-serif"><br>
&lt;/clickbutton&gt;</font><font size=3D3 face=3D"Times New Roman"> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
-----------------------</font><font size=3D3 face=3D"Times New Roman"> =
</font><font size=3D2 face=3D"sans-serif"><br>
Error Message:</font><font size=3D3 face=3D"Times New Roman"> </font><font =
size=3D2 face=3D"sans-serif"><br>
-----------------------</font><font size=3D3 face=3D"Times New Roman"> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
com.canoo.webtest.engine.StepFailedException: Button with name &lt;&lt;not =
specified&gt;&gt; <br>
and value &lt;I Agree&gt; not found!, Step: ClickButton at =
=66ile:C:/Development/sandbox/canoo_1.6-544/tests/rosm/bvt/Register.xml:36:=
 =
with (label=3D&quot;I Agree&quot;, step Id=3D&quot;Click =
&amp;apos;Agree&amp;apos; button&quot;, stepType=3D&quot;clickbutton&quot;)=
 =
</font>
<p><font size=3D3 face=3D"Times New =
Roman">=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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D<br>
IMPORTANT NOTICE: This communication, including any attachment, contains =
information that may be confidential or privileged, and is intended solely =
=66or the entity or individual to whom it is addressed. If you are not the =
intended recipient, you should delete this message and are hereby notified =
that any disclosure, copying, or distribution of this message is strictly =
prohibited. Nothing in this email, including any attachment, is intended to=
 =
be a legally binding signature.<br>
=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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D</font>
<p>
<p>
<P>=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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D<br>
IMPORTANT NOTICE: This communication, including any attachment, contains =
information that may be confidential or privileged, and is intended solely =
=66or the entity or individual to whom it is addressed.  If you are not the=
 =
intended recipient, you should delete this message and are hereby notified =
that any disclosure, copying, or distribution of this message is strictly =
prohibited.  Nothing in this email, including any attachment, is intended t=
o=
 be a legally binding signature.<br>
=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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D<br>
</P>
--=_alternative 0079935B88256F69_=--