[Webtest] struts with canoo webTest
webtest@lists.canoo.com
webtest@lists.canoo.com
Mon, 27 Jan 2003 12:03:42 -0500
This is a multipart message in MIME format.
--=_alternative 005DB8ED85256CBB_=
Content-Type: text/plain; charset="us-ascii"
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 005DB8ED85256CBB_=
Content-Type: text/html; charset="us-ascii"
<br><font size=2 face="sans-serif">Hi, </font>
<br><font size=2 face="sans-serif">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. </font>
<br><font size=2 face="sans-serif">The html produced looks as follows:</font>
<br><font size=2 face="sans-serif"><form name="userInfo" method="POST" action="/webapp/ams/Login.do"></font>
<br><font size=2 face="sans-serif"> <table border="0"></font>
<br><font size=2 face="sans-serif"> <tr><td>User:</td><td><input type="text" name="userName" maxlength="15" size="15" value=""></td></tr></font>
<br><font size=2 face="sans-serif"> <tr><td>Password:</td><td><input type="password" name="password" maxlength="15" size="15" value=""></td></tr></font>
<br><font size=2 face="sans-serif"> <tr><td /><td><input type="submit" <b>name="action"</b> value="Login"></font>
<br>
<br><font size=2 face="sans-serif">and the corresponding clickbutton statement is as follows:</font>
<br><font size=2 face="sans-serif"> <setinputfield</font>
<br><font size=2 face="sans-serif"> stepid="set user name" </font>
<br><font size=2 face="sans-serif"> name="userName" </font>
<br><font size=2 face="sans-serif"> value="yyyyyyyy" /></font>
<br><font size=2 face="sans-serif"> <setinputfield</font>
<br><font size=2 face="sans-serif"> stepid="set password"</font>
<br><font size=2 face="sans-serif"> name="password"</font>
<br><font size=2 face="sans-serif"> value="xxxxxx" /></font>
<br><font size=2 face="sans-serif"> <clickbutton </font>
<br><font size=2 face="sans-serif"> name="Login"</font>
<br><font size=2 face="sans-serif"> stepid="Click the Login button"></font>
<br><font size=2 face="sans-serif"> <form name="userInfo" /></font>
<br><font size=2 face="sans-serif"> </clickbutton></font>
<br>
<br><font size=2 face="sans-serif">The error message I get back is:</font>
<br><font size=3 color=blue face="Times New Roman"><</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"> </font>
<br>
<br><font size=2 face="sans-serif">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>
<br>
<br><font size=2 face="sans-serif">If anyone has any suggestions, I am all ears.</font>
<br>
<br><font size=2 face="sans-serif">Thanks,<br>
<br>
Matt Zylstra<br>
<br>
</font>
--=_alternative 005DB8ED85256CBB_=--