<html>
<body>
<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><br>
<font size=2><clickbutton <br>
name="action"</font> [or
label="Login" ]<br>
<font size=2> stepid="Click the Login
button"></font> <br>
<font size=2> <form
name="userInfo" /></font> <br>
<font size=2></clickbutton></font> <br><br>
Chris....<br><br>
At 1/27/2003 11:03 AM, you wrote:<br><br>
<br>
<blockquote type=cite class=cite cite><font size=2>Hi, </font><br>
<font size=2>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>The html produced looks as follows:</font> <br>
<font size=2><form name="userInfo" method="POST"
action="/webapp/ams/Login.do"></font> <br>
<font size=2> <table border="0"></font>
<br>
<font size=2>
<tr><td>User:</td><td><input type="text"
name="userName" maxlength="15" size="15"
value=""></td></tr></font> <br>
<font size=2>
<tr><td>Password:</td><td><input
type="password" name="password" maxlength="15"
size="15" value=""></td></tr></font> <br>
<font size=2> <tr><td
/><td><input type="submit" <b>name="action"</b>
value="Login"></font> <br><br>
<font size=2>and the corresponding clickbutton statement is as follows:</font>
<br>
<font
size=2>
<setinputfield</font> <br>
<font
size=2>
stepid="set user name" </font><br>
<font
size=2>
name="userName" </font><br>
<font
size=2>
value="yyyyyyyy" /></font> <br>
<font
size=2>
<setinputfield</font> <br>
<font
size=2>
stepid="set password"</font> <br>
<font
size=2>
name="password"</font> <br>
<font
size=2>
value="xxxxxx" /></font> <br>
<font
size=2>
<clickbutton </font><br>
<font
size=2>
name="Login"</font> <br>
<font
size=2>
stepid="Click the Login button"></font> <br>
<font
size=2>
<form name="userInfo" /></font> <br>
<font
size=2>
</clickbutton></font> <br><br>
<font size=2>The error message I get back is:</font> <br>
<font face="Times New Roman, Times" color="#0000FF"><</font><font face="Times
New Roman, Times" color="#990000">failure</font><font face="Times New Roman,
Times"> </font><font face="Times New Roman, Times"
color="#990000">message</font><font face="Times New Roman, Times"
color="#0000FF">="</font><font face="Times New Roman,
Times"><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
face="Times New Roman, Times" color="#0000FF">" /></font><font
face="Times New Roman, Times"> </font><br><br>
<font size=2>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>If anyone has any suggestions, I am all ears.</font> <br><br>
<font size=2>Thanks,<br><br>
Matt Zylstra<br>
</font></blockquote></body>
</html>