[Webtest] Re: clickButton Problem

Ian Phillips Ian Phillips" <phillipsic@gmail.com
Thu, 4 Jan 2007 15:55:29 +0100


------=_Part_11175_1595072.1167922529319
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Marc.

That has solved my problem, thanks.

Ian

On 1/4/07, Marc Guillemot <mguillemot@yahoo.fr> wrote:
>
> Hi Ian,
>
> " login " is not the name of your button but it's value. Just try:
>
> <clickButton label=" Login "/>
>
> Looking at that, I've seen that the examples in the documentation are
> wrong. I will fix them.
>
> Marc.
>
> Ian Phillips wrote:
> > Hi.
> >
> > I have just installed canoo webtest and have been playing with some of
> > the demo test scripts.
> >
> > I have modified the simpleTest.xml to invoke my app and login.  But it
> > fails on clicking a button.
> >
> > here is the html:
> > <FORM METHOD=post ACTION="index.php">
> > <table align=center>
> >     <tr><th>Name: <td><INPUT SIZE=10 NAME="login">
> >     <tr><th>Password:<td> <INPUT SIZE=10 TYPE="password" NAME="passwd">
> >     <tr><td colspan=2 align=center>
> >     <INPUT TYPE="hidden" NAME="what" VALUE="loggon_step">
> >     <INPUT TYPE="hidden" NAME="myGroup" VALUE="-1">
> >     <INPUT TYPE="submit" VALUE=" Login ">
> > </table>
> > </FORM>
> >
> >
> > This is my code:
> > <setInputField
> >                     description="set user name"
> >                     name="login"
> >                     value="user" />
> >                 <setInputField
> >                     description="set password"
> >                     name="passwd"
> >                     value="passwd" />
> >                 <clickButton
> >                     description="Click the submit button"
> >                     name=" Login "/>
> >
> >
> > This is the result:
> > <step>
> >                 <parameter name="description" value="Click the submit
> > button"/>
> >                 <parameter name="name" value="Login"/>
> >                 <parameter name="taskName" value="clickButton"/>
> >                 <result>
> >                     <failed duration="0"/>
> >                 </result>
> >             </step>
> >             <step>
> >                 <parameter name="description" value="Home Page follows
> > if login ok"/>
> >                 <parameter name="taskName" value="verifyTitle"/>
> >                 <parameter name="text" value="Home Page"/>
> >                 <result>
> >                     <notexecuted duration="0"/>
> >                 </result>
> >             </step>
> >             <failure
> > message="com.canoo.webtest.engine.StepFailedException: No button found,
> > Step: ClickButton at C:\canoo\doc\samples\SimpleTest.xml:34:  with
> > (description=&quot;Click the submit button&quot;, name=&quot; Login
> > &quot;, taskName=&quot;clickButton&quot;)"/>
> >
> > Could someone point out what I am doing wrong?
> >
> > Thanks
> >
> > Ian
> >
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

------=_Part_11175_1595072.1167922529319
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Marc.<br><br>That has solved my problem, thanks.<br><br>Ian<br><br><div><span class="gmail_quote">On 1/4/07, <b class="gmail_sendername">Marc Guillemot</b> &lt;<a href="mailto:mguillemot@yahoo.fr">mguillemot@yahoo.fr</a>
&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Ian,<br><br>&quot; login &quot; is not the name of your button but it&#39;s value. Just try:
<br><br>&lt;clickButton label=&quot; Login &quot;/&gt;<br><br>Looking at that, I&#39;ve seen that the examples in the documentation are<br>wrong. I will fix them.<br><br>Marc.<br><br>Ian Phillips wrote:<br>&gt; Hi.<br>&gt;
<br>&gt; I have just installed canoo webtest and have been playing with some of<br>&gt; the demo test scripts.<br>&gt;<br>&gt; I have modified the simpleTest.xml to invoke my app and login.&nbsp;&nbsp;But it<br>&gt; fails on clicking a button.
<br>&gt;<br>&gt; here is the html:<br>&gt; &lt;FORM METHOD=post ACTION=&quot;index.php&quot;&gt;<br>&gt; &lt;table align=center&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;th&gt;Name: &lt;td&gt;&lt;INPUT SIZE=10 NAME=&quot;login&quot;&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;th&gt;Password:&lt;td&gt; &lt;INPUT SIZE=10 TYPE=&quot;password&quot; NAME=&quot;passwd&quot;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;td colspan=2 align=center&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;INPUT TYPE=&quot;hidden&quot; NAME=&quot;what&quot; VALUE=&quot;loggon_step&quot;&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;INPUT TYPE=&quot;hidden&quot; NAME=&quot;myGroup&quot; VALUE=&quot;-1&quot;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;INPUT TYPE=&quot;submit&quot; VALUE=&quot; Login &quot;&gt;<br>&gt; &lt;/table&gt;<br>&gt; &lt;/FORM&gt;<br>
&gt;<br>&gt;<br>&gt; This is my code:<br>&gt; &lt;setInputField<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=&quot;set user name&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;login&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&quot;user&quot; /&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;setInputField<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=&quot;set password&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;passwd&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&quot;passwd&quot; /&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;clickButton<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=&quot;Click the submit button&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot; Login &quot;/&gt;<br>&gt;<br>&gt;<br>&gt; This is the result:<br>&gt; &lt;step&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter name=&quot;description&quot; value=&quot;Click the submit<br>&gt; button&quot;/&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter name=&quot;name&quot; value=&quot;Login&quot;/&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter name=&quot;taskName&quot; value=&quot;clickButton&quot;/&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;result&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;failed duration=&quot;0&quot;/&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/result&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/step&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;step&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter name=&quot;description&quot; value=&quot;Home Page follows
<br>&gt; if login ok&quot;/&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter name=&quot;taskName&quot; value=&quot;verifyTitle&quot;/&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter name=&quot;text&quot; value=&quot;Home Page&quot;/&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;result&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;notexecuted duration=&quot;0&quot;/&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/result&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/step&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;failure<br>
&gt; message=&quot;com.canoo.webtest.engine.StepFailedException: No button found,<br>&gt; Step: ClickButton at C:\canoo\doc\samples\SimpleTest.xml:34:&nbsp;&nbsp;with<br>&gt; (description=&amp;quot;Click the submit button&amp;quot;, name=&amp;quot; Login
<br>&gt; &amp;quot;, taskName=&amp;quot;clickButton&amp;quot;)&quot;/&gt;<br>&gt;<br>&gt; Could someone point out what I am doing wrong?<br>&gt;<br>&gt; Thanks<br>&gt;<br>&gt; Ian<br>&gt;<br><br>_______________________________________________
<br>WebTest mailing list<br><a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br><a href="http://lists.canoo.com/mailman/listinfo/webtest">http://lists.canoo.com/mailman/listinfo/webtest</a><br></blockquote>
</div><br>

------=_Part_11175_1595072.1167922529319--