[Webtest] Clickbutton error using HtmlUnit-based WebTest

Lisa Crispin webtest@lists.canoo.com
Thu, 11 Nov 2004 01:16:17 +0000


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


I remember I did have this problem with clickbutton on type=button before, and there was a patch for it in the old version of WebTest, see posting http://lists.canoo.com/pipermail/webtest/2003q3/001148.html

This sure looks like it is a problem with WebTest to me, since it works with the HTTPUnit-based WebTest and not the HtmlUnit one, and also the fact that it used to be a problem with the HTTPUnit one.  We have a lot of buttons like this used by lots of existing scripts; we can't use this new version of WebTest until we know some way around this problem.

Thanks,
Lisa


-------------- Original message from lisa.crispin@att.net (Lisa Crispin): -------------- 


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_12180_1100135777_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit

<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV class=signature id=signature>I remember I did have this problem with clickbutton on type=button before, and there was a patch for it in the old version of WebTest, see posting <A href="http://lists.canoo.com/pipermail/webtest/2003q3/001148.html">http://lists.canoo.com/pipermail/webtest/2003q3/001148.html</A></DIV>
<DIV class=signature>&nbsp;</DIV>
<DIV class=signature>This sure looks like it is a problem with WebTest to me, since it works with the HTTPUnit-based WebTest and not the HtmlUnit one, and also the fact that it used to be a problem with the HTTPUnit one.&nbsp; We have a lot of buttons like this used by lots of existing scripts; we can't use this new version of WebTest until we know some way around this problem.</DIV>
<DIV class=signature>&nbsp;</DIV>
<DIV class=signature>Thanks,</DIV>
<DIV class=signature>Lisa</DIV><BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message from lisa.crispin@att.net (Lisa Crispin): -------------- <BR><BR><!-- BEGIN WEBMAIL STATIONERY --><!-- 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 --></BLOCKQUOTE>
<!-- END WEBMAIL STATIONERY -->

</body>
</html>

--NextPart_Webmail_9m3u9jl4l_12180_1100135777_0--