3 messages in com.canoo.lists.webtestRe: [Webtest] struts with canoo webTest| From | Sent On | Attachments |
|---|---|---|
| mzyl...@aep.com | 27 Jan 2003 09:03 | |
| Chris Hane | 27 Jan 2003 10:26 | |
| mzyl...@aep.com | 27 Jan 2003 10:33 |
| Subject: | Re: [Webtest] struts with canoo webTest![]() |
|---|---|
| From: | mzyl...@aep.com (mzyl...@aep.com) |
| Date: | 01/27/2003 10:33:18 AM |
| List: | com.canoo.lists.webtest |
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 <chr...@itsolut.com> Sent by: webt...@gate.canoo.com 01/27/2003 01:27 PM Please respond to webtest
To: webt...@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




