[Webtest] Ajax button and multipart/form-data

Parkin Roman roman.parkin@texunatech.com
Fri, 14 Sep 2012 13:18:30 +0400


<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi all,<br>
    <br>
    I have problem with AjaxButton on multipart forms<br>
    <br>
    See example page -
    <a class="moz-txt-link-freetext" href="http://www.wicket-library.com/wicket-examples/ajax/upload">http://www.wicket-library.com/wicket-examples/ajax/upload</a><br>
    <br>
    I use htmlunit 2.10, easyAjax = true<br>
    <br>
    &nbsp;&nbsp;&nbsp; &lt;invoke
    url=<a class="moz-txt-link-rfc2396E" href="http://www.wicket-library.com/wicket-examples/ajax/upload?">"http://www.wicket-library.com/wicket-examples/ajax/upload?"</a>/&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;clickButton label="Ajax Submit"/&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;verifyText text="This request was processed using AJAX"/&gt;<br>
    <br>
    I try to click "Ajax Submit" - button is clicked but empty page is
    returned for FF3.6 in webtest config<br>
    JavaScript error is shown for IE8 in webtest config: <br>
    <br>
    TypeError: Cannot call method "removeChild" of null
(<a class="moz-txt-link-freetext" href="http://www.wicket-library.com/wicket-examples/ajax/wicket/resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax-ver-EE9CA4F0AAB28E94F63408F7494C6EEC.js#896">http://www.wicket-library.com/wicket-examples/ajax/wicket/resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax-ver-EE9CA4F0AAB28E94F63408F7494C6EEC.js#896</a>)<br>
    <br>
    How I can click AjaxButtons with multipart sumbit? Or webtest /
    htmlunit cannot work correctly with such buttons? Any "hacks" to
    work with AjaxButton in multipart form?<br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      Best regards,<br>
      <b>Roman Parkin</b><br>
      Testing Team Lead<br>
      <b><a href="http://www.texunatech.com">Texuna Technologies Ltd</a></b><br>
      <font size="1">
        This email is confidential and may also be privileged. If you
        are not the intended recipient please notify us immediately and
        delete this message from your system.<br>
        Help us to be environmentally responsible. Please do not print
        this email unless you need to. <br>
      </font>
    </div>
  </body>
</html>