[Webtest] Clickbutton error using HtmlUnit-based WebTest

Lisa Crispin webtest@lists.canoo.com
Tue, 09 Nov 2004 23:51:16 +0000


--NextPart_Webmail_9m3u9jl4l_27112_1100044276_0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

Using build 548, I am running a script that works fine in the HTTPUnit-based WebTest.  

It gets this error now:
com.canoo.webtest.engine.StepFailedException: No button found, Step: ClickButton at C:\java\eplan\test\WebTest\modules\acceptPlanDocs.xml:2: with (stepId="accept the plan docs ", name="acceptDocs", stepType="clickbutton")

The HTML is:
<input name="acceptDocs" type="button" class="formbutton" value="Accept Plan Documents" onclick="javascript: location.href = 'step4.jsp?submit=1';">&nbsp;

The WebTest script has:
  <clickbutton stepid="accept the plan docs "
          name="acceptDocs"/>

Why doesn't it think this is a button?  Other buttons do work but they are type="submit".  Seems like I had a problem with this once in the HTTPUnit-based WebTest, but it has worked now for a long time (this script runs every night).

Thanks,
Lisa
--NextPart_Webmail_9m3u9jl4l_27112_1100044276_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit

<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>Using build 548, I am running a script that works fine in the HTTPUnit-based WebTest.&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>It gets this error now:</DIV>
<DIV>com.canoo.webtest.engine.StepFailedException: No button found, Step: ClickButton at C:\java\eplan\test\WebTest\modules\acceptPlanDocs.xml:2: with (stepId="accept the plan docs ", name="acceptDocs", stepType="clickbutton")</DIV>
<DIV>&nbsp;</DIV>
<DIV>The HTML is:</DIV>
<DIV>&lt;input name="acceptDocs" type="button" class="formbutton" value="Accept Plan Documents" onclick="javascript: location.href = 'step4.jsp?submit=1';"&gt;&amp;nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>The WebTest script has:</DIV>
<DIV>&nbsp;&nbsp;&lt;clickbutton stepid="accept the plan docs "<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; name="acceptDocs"/&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Why doesn't it think this is a button?&nbsp; Other buttons do work but they are type="submit".&nbsp; Seems like I had a problem with this once in the HTTPUnit-based WebTest, but it has worked now for a long time (this script runs every night).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks,</DIV>
<DIV>Lisa<BR></DIV>
<DIV><BR>&nbsp;</DIV>
<!-- END WEBMAIL STATIONERY -->

</body>
</html>

--NextPart_Webmail_9m3u9jl4l_27112_1100044276_0--