[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="Click the submit button", name=" Login
> > ", taskName="clickButton")"/>
> >
> > 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> <<a href="mailto:mguillemot@yahoo.fr">mguillemot@yahoo.fr</a>
> 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>" login " is not the name of your button but it's value. Just try:
<br><br><clickButton label=" Login "/><br><br>Looking at that, I've seen that the examples in the documentation are<br>wrong. I will fix them.<br><br>Marc.<br><br>Ian Phillips wrote:<br>> Hi.<br>>
<br>> I have just installed canoo webtest and have been playing with some of<br>> the demo test scripts.<br>><br>> I have modified the simpleTest.xml to invoke my app and login. But it<br>> 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<br>> 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
<br>> 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<br>
> message="com.canoo.webtest.engine.StepFailedException: No button found,<br>> Step: ClickButton at C:\canoo\doc\samples\SimpleTest.xml:34: with<br>> (description=&quot;Click the submit button&quot;, name=&quot; Login
<br>> &quot;, taskName=&quot;clickButton&quot;)"/><br>><br>> Could someone point out what I am doing wrong?<br>><br>> Thanks<br>><br>> Ian<br>><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--