[Webtest] struts with canoo webTest
webtest@lists.canoo.com
webtest@lists.canoo.com
Mon, 27 Jan 2003 13:33:40 -0500
This is a multipart message in MIME format.
--=_alternative 0065F59085256CBB_=
Content-Type: text/plain; charset="us-ascii"
Thanks for the quick response. I am real new to the webtest framework and
was a little stumped. I actually saw the "label"parameter after I posted.
I am currently using both the name and the label parameter in tandem.
Thanks again,
Matt Zylstra
Chris Hane <chris@itsolut.com>
Sent by: webtest-admin@gate.canoo.com
01/27/2003 01:27 PM
Please respond to webtest
To: webtest@gate.canoo.com
cc:
Subject: Re: [Webtest] struts with canoo webTest
Matt,
In the <clickbutton> use "action" for the name attribute. If you want to
use "Login" to identify the button use the label attribute in
<clickbutton>. Your element should look like:
<clickbutton
name="action" [or label="Login" ]
stepid="Click the Login button">
<form name="userInfo" />
</clickbutton>
Chris....
At 1/27/2003 11:03 AM, you wrote:
Hi,
I am using webtest to perform functional testing with our webapp. We have
been developing using the Struts framework. My first problem deals with
using forms.
The html produced looks as follows:
<form name="userInfo" method="POST" action="/webapp/ams/Login.do">
<table border="0">
<tr><td>User:</td><td><input type="text" name="userName"
maxlength="15" size="15" value=""></td></tr>
<tr><td>Password:</td><td><input type="password" name="password"
maxlength="15" size="15" value=""></td></tr>
<tr><td /><td><input type="submit" name="action" value="Login">
and the corresponding clickbutton statement is as follows:
<setinputfield
stepid="set user name"
name="userName"
value="yyyyyyyy" />
<setinputfield
stepid="set password"
name="password"
value="xxxxxx" />
<clickbutton
name="Login"
stepid="Click the Login button">
<form name="userInfo" />
</clickbutton>
The error message I get back is:
<failure message="com.canoo.webtest.engine.StepFailedException: Button with name <Login> and
value <<not specified>> not found!, Step: ClickButton(id="Click the Login
button"label=null)" />
I fully believe that the name attribute in the input block of the html is
causing me the trouble. I am a little confused what to do since Struts
set that parameter with the property tag.
If anyone has any suggestions, I am all ears.
Thanks,
Matt Zylstra
--=_alternative 0065F59085256CBB_=
Content-Type: text/html; charset="us-ascii"
<br><font size=2 face="sans-serif">Thanks for the quick response. I am real new to the webtest framework and was a little stumped. I actually saw the "label"parameter after I posted. I am currently using both the name and the label parameter in tandem. </font>
<br>
<br><font size=2 face="sans-serif">Thanks again,<br>
<br>
Matt Zylstra<br>
<br>
<br>
<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Chris Hane <chris@itsolut.com></b></font>
<br><font size=1 face="sans-serif">Sent by: webtest-admin@gate.canoo.com</font>
<p><font size=1 face="sans-serif">01/27/2003 01:27 PM</font>
<br><font size=1 face="sans-serif">Please respond to webtest</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> To: webtest@gate.canoo.com</font>
<br><font size=1 face="sans-serif"> cc: </font>
<br><font size=1 face="sans-serif"> Subject: Re: [Webtest] struts with canoo webTest</font></table>
<br>
<br>
<br><font size=3 face="Times New Roman"><br>
Matt,<br>
<br>
In the <clickbutton> use "action" for the name attribute. If you want to use "Login" to identify the button use the label attribute in <clickbutton>. Your element should look like:<br>
</font><font size=2 face="Times New Roman"><br>
<clickbutton <br>
name="action"</font><font size=3 face="Times New Roman"> [or label="Login" ]</font><font size=2 face="Times New Roman"><br>
stepid="Click the Login button"></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<form name="userInfo" /></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
</clickbutton></font><font size=3 face="Times New Roman"> <br>
<br>
Chris....<br>
<br>
At 1/27/2003 11:03 AM, you wrote:<br>
<br>
</font>
<br><font size=2 face="Times New Roman">Hi, <br>
I am using webtest to perform functional testing with our webapp. We have been developing using the Struts framework. My first problem deals with using forms. <br>
The html produced looks as follows:</font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<form name="userInfo" method="POST" action="/webapp/ams/Login.do"></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<table border="0"></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<tr><td>User:</td><td><input type="text" name="userName" maxlength="15" size="15" value=""></td></tr></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<tr><td>Password:</td><td><input type="password" name="password" maxlength="15" size="15" value=""></td></tr></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<tr><td /><td><input type="submit" <b>name="action"</b> value="Login"></font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="Times New Roman"><br>
and the corresponding clickbutton statement is as follows:</font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<setinputfield</font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
stepid="set user name" <br>
name="userName" <br>
value="yyyyyyyy" /></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<setinputfield</font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
stepid="set password"</font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
name="password"</font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
value="xxxxxx" /></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<clickbutton <br>
name="Login"</font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
stepid="Click the Login button"></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
<form name="userInfo" /></font><font size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
</clickbutton></font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="Times New Roman"><br>
The error message I get back is:</font><font size=3 face="Times New Roman"> </font><font size=3 color=blue face="Times New Roman"><br>
<</font><font size=3 color=#990000 face="Times New Roman">failure</font><font size=3 face="Times New Roman"> </font><font size=3 color=#990000 face="Times New Roman">message</font><font size=3 color=blue face="Times New Roman">="</font><font size=3 face="Times New Roman"><b>com.canoo.webtest.engine.StepFailedException: Button with name <Login> and value <<not specified>> not found!, Step: ClickButton(id="Click the Login button"label=null)</b></font><font size=3 color=blue face="Times New Roman">" /></font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="Times New Roman"><br>
I fully believe that the name attribute in the input block of the html is causing me the trouble. I am a little confused what to do since Struts set that parameter with the property tag. </font><font size=3 face="Times New Roman"><br>
</font><font size=2 face="Times New Roman"><br>
If anyone has any suggestions, I am all ears.</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="Times New Roman"><br>
Thanks,<br>
<br>
Matt Zylstra</font>
<br>
<br>
--=_alternative 0065F59085256CBB_=--