[Webtest] clickButton Problem

Ian Phillips Ian Phillips" <phillipsic@gmail.com
Thu, 4 Jan 2007 14:20:06 +0100


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

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

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

Hi.<br><br>I have just installed canoo webtest and have been playing with some of the demo test scripts.<br><br>I have modified the simpleTest.xml to invoke my app and login.&nbsp; But it fails on clicking a button.<br><br>here is the html:
<br>&lt;FORM METHOD=post ACTION=&quot;index.php&quot;&gt;<br>&lt;table align=center&gt;<br>&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;th&gt;Name: &lt;td&gt;&lt;INPUT SIZE=10 NAME=&quot;login&quot;&gt;<br>&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>&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;td colspan=2 align=center&gt;<br>&nbsp;&nbsp;&nbsp; &lt;INPUT TYPE=&quot;hidden&quot; NAME=&quot;what&quot; VALUE=&quot;loggon_step&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;INPUT TYPE=&quot;hidden&quot; NAME=&quot;myGroup&quot; VALUE=&quot;-1&quot;&gt;
<br>&nbsp;&nbsp;&nbsp; &lt;INPUT TYPE=&quot;submit&quot; VALUE=&quot; Login &quot;&gt;<br>&lt;/table&gt;<br>&lt;/FORM&gt;<br><br><br>This is my code:<br>&lt;setInputField<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; description=&quot;set user name&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; name=&quot;login&quot;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value=&quot;user&quot; /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;setInputField<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; description=&quot;set password&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; name=&quot;passwd&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value=&quot;passwd&quot; /&gt;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;clickButton<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; description=&quot;Click the submit button&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; name=&quot; Login &quot;/&gt;<br><br><br>This is the result:<br>&lt;step&gt;<br>&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 button&quot;/&gt;
<br>&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>&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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;result&gt;<br>&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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/result&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/step&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;step&gt;<br>&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 if login ok&quot;/&gt;<br>&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>&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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;result&gt;<br>&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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/result&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/step&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;failure message=&quot;com.canoo.webtest.engine.StepFailedException: No button found, Step: ClickButton at C:\canoo\doc\samples\SimpleTest.xml:34:&nbsp; with (description=&amp;quot;Click the submit button&amp;quot;, name=&amp;quot; Login &amp;quot;, taskName=&amp;quot;clickButton&amp;quot;)&quot;/&gt;
<br><br>Could someone point out what I am doing wrong?<br><br>Thanks<br><br>Ian<br><br>

------=_Part_9242_11920701.1167916806305--