[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="Click the
submit button", name=" Login ",
taskName="clickButton")"/>
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. But it fails on clicking a button.<br><br>here is the html:
<br><FORM METHOD=post ACTION="index.php"><br><table align=center><br> <tr><th>Name: <td><INPUT SIZE=10 NAME="login"><br> <tr><th>Password:<td> <INPUT SIZE=10 TYPE="password" NAME="passwd">
<br> <tr><td colspan=2 align=center><br> <INPUT TYPE="hidden" NAME="what" VALUE="loggon_step"><br> <INPUT TYPE="hidden" NAME="myGroup" VALUE="-1">
<br> <INPUT TYPE="submit" VALUE=" Login "><br></table><br></FORM><br><br><br>This is my code:<br><setInputField<br> description="set user name"<br> name="login"
<br> value="user" /><br> <setInputField<br> description="set password"<br> name="passwd"<br> value="passwd" />
<br> <clickButton<br> description="Click the submit button"<br> name=" Login "/><br><br><br>This is the result:<br><step><br> <parameter name="description" value="Click the submit button"/>
<br> <parameter name="name" value="Login"/><br> <parameter name="taskName" value="clickButton"/><br> <result><br> <failed duration="0"/>
<br> </result><br> </step><br> <step><br> <parameter name="description" value="Home Page follows if login ok"/><br> <parameter name="taskName" value="verifyTitle"/>
<br> <parameter name="text" value="Home Page"/><br> <result><br> <notexecuted duration="0"/><br> </result>
<br> </step><br> <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;)"/>
<br><br>Could someone point out what I am doing wrong?<br><br>Thanks<br><br>Ian<br><br>
------=_Part_9242_11920701.1167916806305--