3 messages in com.canoo.lists.webtestRe: [Webtest] struts with canoo webTest
FromSent OnAttachments
mzyl...@aep.com27 Jan 2003 09:03 
Chris Hane27 Jan 2003 10:26 
mzyl...@aep.com27 Jan 2003 10:33 
Subject:Re: [Webtest] struts with canoo webTest
From:Chris Hane (chr@itsolut.com)
Date:01/27/2003 10:26:42 AM
List:com.canoo.lists.webtest

<html> <body> <br> Matt,<br><br> In the &lt;clickbutton&gt; use &quot;action&quot; for the name attribute.&nbsp; If you want to use &quot;Login&quot; to identify the button use the label attribute in &lt;clickbutton&gt;.&nbsp; Your element should look like:<br><br> <font size=2>&lt;clickbutton <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;action&quot;</font>&nbsp;&nbsp;&nbsp;&nbsp; [or label=&quot;Login&quot; ]<br> <font size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stepid=&quot;Click the Login button&quot;&gt;</font> <br> <font size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;form name=&quot;userInfo&quot; /&gt;</font> <br> <font size=2>&lt;/clickbutton&gt;</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.&nbsp; We have been developing using the Struts framework.&nbsp; My first problem deals with using forms.&nbsp; </font> <br> <font size=2>The html produced looks as follows:</font> <br> <font size=2>&lt;form name=&quot;userInfo&quot; method=&quot;POST&quot; action=&quot;/webapp/ams/Login.do&quot;&gt;</font> <br> <font size=2>&nbsp;&nbsp;&nbsp; &lt;table border=&quot;0&quot;&gt;</font> <br> <font size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;tr&gt;&lt;td&gt;User:&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot;
name=&quot;userName&quot; maxlength=&quot;15&quot; size=&quot;15&quot;
value=&quot;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;</font> <br> <font size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;tr&gt;&lt;td&gt;Password:&lt;/td&gt;&lt;td&gt;&lt;input
type=&quot;password&quot; name=&quot;password&quot; maxlength=&quot;15&quot;
size=&quot;15&quot; value=&quot;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;</font> <br> <font size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;td
/&gt;&lt;td&gt;&lt;input type=&quot;submit&quot; <b>name=&quot;action&quot;</b>
value=&quot;Login&quot;&gt;</font> <br><br> <font size=2>and the corresponding clickbutton statement is as follows:</font>
<br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;setinputfield</font> <br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
stepid=&quot;set user name&quot; </font><br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
name=&quot;userName&quot; </font><br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
value=&quot;yyyyyyyy&quot; /&gt;</font> <br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;setinputfield</font> <br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
stepid=&quot;set password&quot;</font> <br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
name=&quot;password&quot;</font> <br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
value=&quot;xxxxxx&quot; /&gt;</font> <br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;clickbutton </font><br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
name=&quot;Login&quot;</font> <br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
stepid=&quot;Click the Login button&quot;&gt;</font> <br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;form name=&quot;userInfo&quot; /&gt;</font> <br> <font
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/clickbutton&gt;</font> <br><br> <font size=2>The error message I get back is:</font> <br> <font face="Times New Roman, Times" color="#0000FF">&lt;</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">=&quot;</font><font face="Times New Roman,
Times"><b>com.canoo.webtest.engine.StepFailedException: Button with name
&lt;Login&gt; and value &lt;&lt;not specified&gt;&gt; not found!, Step:
ClickButton(id=&quot;Click the Login button&quot;label=null)</b></font><font
face="Times New Roman, Times" color="#0000FF">&quot; /&gt;</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.&nbsp; I am a little confused what to do since
Struts set that parameter with the property tag.&nbsp; </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>