[Webtest] Ajax button and multipart/form-data

Parkin Roman roman.parkin@texunatech.com
Mon, 17 Sep 2012 18:06:47 +0400


<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    It helps to obtain ajax response and text can be verified only. <br>
    But re-clicking buttons / re-set inputs are not possible due to
    error "Current response is not an HTML page but of type text/xml"<br>
    <br>
    For specific project tested application has the same buttons as
    wicket page presented as example. But i need set inputs in
    regenerated page after clicking ajax button.<br>
    This problem blocks using webtest on this project.<br>
    <br>
    Regards,<br>
    Roman<br>
    <br>
    <div class="moz-cite-prefix">On 17/09/2012 15:21, Marlon Palo wrote:<br>
    </div>
    <blockquote cite="mid:BLU144-W2864B37CBECA6A173E0D5FCE950@phx.gbl"
      type="cite">
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
      <div dir="ltr"> <br>
        Hi,
        <div><br>
        </div>
        <div><span class="GRcorrect"
            id="GRmark_3d1bd1d60b79931bc845628ca27ea8c8cc5fa7e0_try:0"
            grphrase="3d1bd1d60b79931bc845628ca27ea8c8cc5fa7e0"
            grtype="null">try</span> this</div>
        <div><br>
        </div>
        <div>
          <div>&lt;<span class="GRcorrect"
              id="GRmark_97b5128f58bcd0f2eebb5ad9a3bc4014c502eb2e_invoke:0"
              grphrase="97b5128f58bcd0f2eebb5ad9a3bc4014c502eb2e"
              grtype="null">invoke</span> 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;</div>
          <div>&lt;<span class="GRcorrect"
              id="GRmark_8475255df6830cbbf1e610279459dafea9575898_clickElement:0"
              grphrase="8475255df6830cbbf1e610279459dafea9575898"
              grtype="null">clickElement</span> xpath="id<span
              class="GRcorrect"
              id="GRmark_8475255df6830cbbf1e610279459dafea9575898_(:1"
              grphrase="8475255df6830cbbf1e610279459dafea9575898"
              grtype="null">(</span>'id3')"/&gt;</div>
          <div>&lt;<span class="GRcorrect"
              id="GRmark_71c38addf8af86979b8d57cc3c428bd14397aa7c_previousResponse:0"
              grphrase="71c38addf8af86979b8d57cc3c428bd14397aa7c"
              grtype="null">previousResponse</span>/&gt;</div>
          <div>&lt;<span class="GRcorrect"
              id="GRmark_9d45b203eaa47493080db9926decc9dd58c10f57_verifyText:0"
              grphrase="9d45b203eaa47493080db9926decc9dd58c10f57"
              grtype="null">verifyText</span> text="This request was
            processed using AJAX"/&gt;</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>Just add the "<span class="GRcorrect"
              id="GRmark_3332be7d22a569690cfc145c7ceab467b2dbeacf_previousResponse:0"
              grphrase="3332be7d22a569690cfc145c7ceab467b2dbeacf"
              grtype="null">previousResponse</span>" tag.</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div>Marlon</div>
          <div>
            <hr id="stopSpelling">From: <a
              class="moz-txt-link-abbreviated"
              href="mailto:roman.parkin@texunatech.com">roman.parkin@texunatech.com</a><br>
            To: <a class="moz-txt-link-abbreviated"
              href="mailto:webtest@lists.canoo.com">webtest@lists.canoo.com</a><br>
            Subject: [Webtest] Ajax button and multipart/form-data<br>
            Date: Fri, 14 Sep 2012 13:18:30 +0400<br>
            <br>
            Hi all,<br>
            <br>
            I have problem with AjaxButton on multipart forms<br>
            <br>
            See example page - <a moz-do-not-send="true"
              class="ecxmoz-txt-link-freetext"
              href="http://www.wicket-library.com/wicket-examples/ajax/upload"
              target="_blank">http://www.wicket-library.com/wicket-examples/ajax/upload</a><br>
            <br>
            I use <span class="GRcorrect"
              id="GRmark_16cc430480a75289e8c50d80e2006cdc9a49ff63_htmlunit:0"
              grphrase="16cc430480a75289e8c50d80e2006cdc9a49ff63"
              grtype="null">htmlunit</span> 2.10, <span
              class="GRcorrect"
              id="GRmark_16cc430480a75289e8c50d80e2006cdc9a49ff63_easyAjax:1"
              grphrase="16cc430480a75289e8c50d80e2006cdc9a49ff63"
              grtype="null">easyAjax</span> = true<br>
            <br>
            &nbsp;&nbsp;&nbsp; &lt;<span class="GRcorrect"
              id="GRmark_d6aa1f3a789f3f3108666e0ac807ca5ca7dc5fa5_invoke:0"
              grphrase="d6aa1f3a789f3f3108666e0ac807ca5ca7dc5fa5"
              grtype="null">invoke</span> url=<a moz-do-not-send="true"
              class="ecxmoz-txt-link-rfc2396E"
              href="http://www.wicket-library.com/wicket-examples/ajax/upload?"
              target="_blank">"http://www.wicket-library.com/wicket-examples/ajax/upload?"</a>/&gt;<br>
            &nbsp;&nbsp;&nbsp; &lt;<span class="GRcorrect"
              id="GRmark_729af28cfeb0ef383e27e1d78c2298d88b883a72_clickButton:0"
              grphrase="729af28cfeb0ef383e27e1d78c2298d88b883a72"
              grtype="null">clickButton</span> label="Ajax Submit"/&gt;<br>
            &nbsp;&nbsp;&nbsp; &lt;<span class="GRcorrect"
              id="GRmark_9d45b203eaa47493080db9926decc9dd58c10f57_verifyText:0"
              grphrase="9d45b203eaa47493080db9926decc9dd58c10f57"
              grtype="null">verifyText</span> text="This request was
            processed using AJAX"/&gt;<br>
            <br>
            I try to click "Ajax Submit" - button is clicked but empty
            page is <span class="GRcorrect"
              id="GRmark_438a2ac71834f1a5f1cc841e4bcbf6ed7234ef77_returned:0"
              grphrase="438a2ac71834f1a5f1cc841e4bcbf6ed7234ef77"
              grtype="null">returned</span> for FF3.6 in <span
              class="GRcorrect"
              id="GRmark_438a2ac71834f1a5f1cc841e4bcbf6ed7234ef77_webtest:1"
              grphrase="438a2ac71834f1a5f1cc841e4bcbf6ed7234ef77"
              grtype="null">webtest</span> config<br>
            JavaScript error is shown for IE8 in <span
              class="GRcorrect"
              id="GRmark_f03b34fd7794701b8960c73485238002692501b2_webtest:0"
              grphrase="f03b34fd7794701b8960c73485238002692501b2"
              grtype="null">webtest</span> config: <br>
            <br>
            TypeError: Cannot call method "<span class="GRcorrect"
              id="GRmark_2976c0646a15641686e01e0ae3a2a0d7a10f6b4a_removeChild:0"
              grphrase="2976c0646a15641686e01e0ae3a2a0d7a10f6b4a"
              grtype="null">removeChild</span>" of null (<a
              moz-do-not-send="true" class="ecxmoz-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"
              target="_blank">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 <span
              class="GRcorrect"
              id="GRmark_5a93f3c49d1fffcc91467fbc67be962b1181e7b8_sumbit:0"
              grphrase="5a93f3c49d1fffcc91467fbc67be962b1181e7b8"
              grtype="null">sumbit</span>? Or <span class="GRcorrect"
              id="GRmark_ddc5fc0baf36ae232141140f6a34a50703fc2d44_webtest:0"
              grphrase="ddc5fc0baf36ae232141140f6a34a50703fc2d44"
              grtype="null">webtest</span> / <span class="GRcorrect"
              id="GRmark_2a8918bb64a478e856ca1cb5afead2ac8548260e_htmlunit:0"
              grphrase="2a8918bb64a478e856ca1cb5afead2ac8548260e"
              grtype="null">htmlunit</span> cannot work correctly with
            such buttons? Any "hacks" <span class="GRcorrect"
              id="GRmark_44e489f31e5747bb6616284f444d38e566959920_to:0"
              grphrase="44e489f31e5747bb6616284f444d38e566959920"
              grtype="null">to</span> <span class="GRcorrect"
              id="GRmark_462312e07b54ef78ef9cc682ac2b726beeeb2bdd_work:0"
              grphrase="462312e07b54ef78ef9cc682ac2b726beeeb2bdd"
              grtype="null">work</span> with AjaxButton in multipart
            form?<br>
            <br>
            <br>
            <div class="ecxmoz-signature">-- <br>
              Best regards,<br>
              <b>Roman Parkin</b><br>
              Testing Team Lead<br>
              <b><a moz-do-not-send="true"
                  href="http://www.texunatech.com" target="_blank">Texuna

                  Technologies Ltd</a></b><br>
              <font size="1"> This email is confidential and may also be
                privileged. If you <span class="GRcorrect"
                  id="GRmark_1c7ff6cf0388646dc1333e45e9aeddc8e7969c59_are:0"
                  grphrase="1c7ff6cf0388646dc1333e45e9aeddc8e7969c59"
                  grtype="null">are</span> not the intended recipient
                please notify us immediately and <span
                  class="GRcorrect"
                  id="GRmark_f04ca1b35203c4a6f74857841813efdf759edc72_delete:0"
                  grphrase="f04ca1b35203c4a6f74857841813efdf759edc72"
                  grtype="null">delete</span> this message from your
                system.<br>
                Help us to be environmentally responsible. Please do not
                print <span class="GRcorrect"
                  id="GRmark_a84cf5f4f67790a412634f3f8a6f41cbc2609263_this:0"
                  grphrase="a84cf5f4f67790a412634f3f8a6f41cbc2609263"
                  grtype="null">this</span> email unless you need to. <br>
              </font> </div>
            _______________________________________________ <span
              class="GRcorrect"
              id="GRmark_f30d92113e25a394e1f1a7dc69433cf0e68a2d81_WebTest:0"
              grphrase="f30d92113e25a394e1f1a7dc69433cf0e68a2d81"
              grtype="null">WebTest</span> mailing list <a
              class="moz-txt-link-abbreviated"
              href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a>
            <a class="moz-txt-link-freetext"
              href="http://lists.canoo.com/mailman/listinfo/webtest">http://lists.canoo.com/mailman/listinfo/webtest</a></div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <br>
  </body>
</html>