[Webtest] Ajax button and multipart/form-data

Marlon Palo Marlon Palo <marlonpalo@hotmail.com>
Mon, 17 Sep 2012 19:21:02 +0800


--_c8b7f89f-9d64-4dea-b3bc-e9caaa34d411_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Hi=2C
try this
<invoke url=3D"http://www.wicket-library.com/wicket-examples/ajax/upload?"/=
><clickElement xpath=3D"id('id3')"/><previousResponse/><verifyText text=3D"=
This request was processed using AJAX"/>

Just add the "previousResponse" tag.

Thanks=2CMarlonFrom: roman.parkin@texunatech.com
To: webtest@lists.canoo.com
Subject: [Webtest] Ajax button and multipart/form-data
Date: Fri=2C 14 Sep 2012 13:18:30 +0400


 =20
   =20
 =20
 =20
    Hi all=2C

   =20

    I have problem with AjaxButton on multipart forms

   =20

    See example page -
    http://www.wicket-library.com/wicket-examples/ajax/upload

   =20

    I use htmlunit 2.10=2C easyAjax =3D true

   =20

        <invoke
    url=3D"http://www.wicket-library.com/wicket-examples/ajax/upload?"/>

        <clickButton label=3D"Ajax Submit"/>

        <verifyText text=3D"This request was processed using AJAX"/>

   =20

    I try to click "Ajax Submit" - button is clicked but empty page is
    returned for FF3.6 in webtest config

    JavaScript error is shown for IE8 in webtest config:=20

   =20

    TypeError: Cannot call method "removeChild" of null
(http://www.wicket-library.com/wicket-examples/ajax/wicket/resource/org.apa=
che.wicket.ajax.WicketAjaxReference/wicket-ajax-ver-EE9CA4F0AAB28E94F63408F=
7494C6EEC.js#896)

   =20

    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?

   =20

   =20

    --=20

      Best regards=2C

      Roman Parkin

      Testing Team Lead

      Texuna Technologies Ltd

     =20
        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.

        Help us to be environmentally responsible. Please do not print
        this email unless you need to.=20

     =20
   =20
 =20

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest 		 	   		  =

--_c8b7f89f-9d64-4dea-b3bc-e9caaa34d411_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Tahoma
}
--></style></head>
<body class=3D'hmmessage'><div dir=3D'ltr'>
<br>Hi=2C<div><br></div><div><span class=3D"GRcorrect" id=3D"GRmark_3d1bd1d=
60b79931bc845628ca27ea8c8cc5fa7e0_try:0" grphrase=3D"3d1bd1d60b79931bc84562=
8ca27ea8c8cc5fa7e0" grtype=3D"null">try</span> this</div><div><br></div><di=
v><div>&lt=3B<span class=3D"GRcorrect" id=3D"GRmark_97b5128f58bcd0f2eebb5ad=
9a3bc4014c502eb2e_invoke:0" grphrase=3D"97b5128f58bcd0f2eebb5ad9a3bc4014c50=
2eb2e" grtype=3D"null">invoke</span> url=3D"http://www.wicket-library.com/w=
icket-examples/ajax/upload?"/&gt=3B</div><div>&lt=3B<span class=3D"GRcorrec=
t" id=3D"GRmark_8475255df6830cbbf1e610279459dafea9575898_clickElement:0" gr=
phrase=3D"8475255df6830cbbf1e610279459dafea9575898" grtype=3D"null">clickEl=
ement</span> xpath=3D"id<span class=3D"GRcorrect" id=3D"GRmark_8475255df683=
0cbbf1e610279459dafea9575898_(:1" grphrase=3D"8475255df6830cbbf1e610279459d=
afea9575898" grtype=3D"null">(</span>'id3')"/&gt=3B</div><div>&lt=3B<span c=
lass=3D"GRcorrect" id=3D"GRmark_71c38addf8af86979b8d57cc3c428bd14397aa7c_pr=
eviousResponse:0" grphrase=3D"71c38addf8af86979b8d57cc3c428bd14397aa7c" grt=
ype=3D"null">previousResponse</span>/&gt=3B</div><div>&lt=3B<span class=3D"=
GRcorrect" id=3D"GRmark_9d45b203eaa47493080db9926decc9dd58c10f57_verifyText=
:0" grphrase=3D"9d45b203eaa47493080db9926decc9dd58c10f57" grtype=3D"null">v=
erifyText</span> text=3D"This request was processed using AJAX"/&gt=3B</div=
><div><br></div><div><br></div><div>Just add the "<span class=3D"GRcorrect"=
 id=3D"GRmark_3332be7d22a569690cfc145c7ceab467b2dbeacf_previousResponse:0" =
grphrase=3D"3332be7d22a569690cfc145c7ceab467b2dbeacf" grtype=3D"null">previ=
ousResponse</span>" tag.</div><div><br></div><div><br></div><div>Thanks=2C<=
/div><div>Marlon</div><div><div id=3D"SkyDrivePlaceholder"></div><hr id=3D"=
stopSpelling">From: roman.parkin@texunatech.com<br>To: webtest@lists.canoo.=
com<br>Subject: [Webtest] Ajax button and multipart/form-data<br>Date: Fri=
=2C 14 Sep 2012 13:18:30 +0400<br><br>
 =20
   =20
 =20
 =20
    Hi all=2C<br>
    <br>
    I have problem with AjaxButton on multipart forms<br>
    <br>
    See example page -
    <a class=3D"ecxmoz-txt-link-freetext" href=3D"http://www.wicket-library=
.com/wicket-examples/ajax/upload" target=3D"_blank">http://www.wicket-libra=
ry.com/wicket-examples/ajax/upload</a><br>
    <br>
    I use <span class=3D"GRcorrect" id=3D"GRmark_16cc430480a75289e8c50d80e2=
006cdc9a49ff63_htmlunit:0" grphrase=3D"16cc430480a75289e8c50d80e2006cdc9a49=
ff63" grtype=3D"null">htmlunit</span> 2.10=2C <span class=3D"GRcorrect" id=
=3D"GRmark_16cc430480a75289e8c50d80e2006cdc9a49ff63_easyAjax:1" grphrase=3D=
"16cc430480a75289e8c50d80e2006cdc9a49ff63" grtype=3D"null">easyAjax</span> =
=3D true<br>
    <br>
    &nbsp=3B&nbsp=3B&nbsp=3B &lt=3B<span class=3D"GRcorrect" id=3D"GRmark_d=
6aa1f3a789f3f3108666e0ac807ca5ca7dc5fa5_invoke:0" grphrase=3D"d6aa1f3a789f3=
f3108666e0ac807ca5ca7dc5fa5" grtype=3D"null">invoke</span>
    url=3D<a class=3D"ecxmoz-txt-link-rfc2396E" href=3D"http://www.wicket-l=
ibrary.com/wicket-examples/ajax/upload?" target=3D"_blank">"http://www.wick=
et-library.com/wicket-examples/ajax/upload?"</a>/&gt=3B<br>
    &nbsp=3B&nbsp=3B&nbsp=3B &lt=3B<span class=3D"GRcorrect" id=3D"GRmark_7=
29af28cfeb0ef383e27e1d78c2298d88b883a72_clickButton:0" grphrase=3D"729af28c=
feb0ef383e27e1d78c2298d88b883a72" grtype=3D"null">clickButton</span> label=
=3D"Ajax Submit"/&gt=3B<br>
    &nbsp=3B&nbsp=3B&nbsp=3B &lt=3B<span class=3D"GRcorrect" id=3D"GRmark_9=
d45b203eaa47493080db9926decc9dd58c10f57_verifyText:0" grphrase=3D"9d45b203e=
aa47493080db9926decc9dd58c10f57" grtype=3D"null">verifyText</span> text=3D"=
This request was processed using AJAX"/&gt=3B<br>
    <br>
    I try to click "Ajax Submit" - button is clicked but empty page is
    <span class=3D"GRcorrect" id=3D"GRmark_438a2ac71834f1a5f1cc841e4bcbf6ed=
7234ef77_returned:0" grphrase=3D"438a2ac71834f1a5f1cc841e4bcbf6ed7234ef77" =
grtype=3D"null">returned</span> for FF3.6 in <span class=3D"GRcorrect" id=
=3D"GRmark_438a2ac71834f1a5f1cc841e4bcbf6ed7234ef77_webtest:1" grphrase=3D"=
438a2ac71834f1a5f1cc841e4bcbf6ed7234ef77" grtype=3D"null">webtest</span> co=
nfig<br>
    JavaScript error is shown for IE8 in <span class=3D"GRcorrect" id=3D"GR=
mark_f03b34fd7794701b8960c73485238002692501b2_webtest:0" grphrase=3D"f03b34=
fd7794701b8960c73485238002692501b2" grtype=3D"null">webtest</span> config: =
<br>
    <br>
    TypeError: Cannot call method "<span class=3D"GRcorrect" id=3D"GRmark_2=
976c0646a15641686e01e0ae3a2a0d7a10f6b4a_removeChild:0" grphrase=3D"2976c064=
6a15641686e01e0ae3a2a0d7a10f6b4a" grtype=3D"null">removeChild</span>" of nu=
ll
(<a class=3D"ecxmoz-txt-link-freetext" href=3D"http://www.wicket-library.co=
m/wicket-examples/ajax/wicket/resource/org.apache.wicket.ajax.WicketAjaxRef=
erence/wicket-ajax-ver-EE9CA4F0AAB28E94F63408F7494C6EEC.js#896" target=3D"_=
blank">http://www.wicket-library.com/wicket-examples/ajax/wicket/resource/o=
rg.apache.wicket.ajax.WicketAjaxReference/wicket-ajax-ver-EE9CA4F0AAB28E94F=
63408F7494C6EEC.js#896</a>)<br>
    <br>
    How I can click AjaxButtons with multipart <span class=3D"GRcorrect" id=
=3D"GRmark_5a93f3c49d1fffcc91467fbc67be962b1181e7b8_sumbit:0" grphrase=3D"5=
a93f3c49d1fffcc91467fbc67be962b1181e7b8" grtype=3D"null">sumbit</span>? Or =
<span class=3D"GRcorrect" id=3D"GRmark_ddc5fc0baf36ae232141140f6a34a50703fc=
2d44_webtest:0" grphrase=3D"ddc5fc0baf36ae232141140f6a34a50703fc2d44" grtyp=
e=3D"null">webtest</span> /
    <span class=3D"GRcorrect" id=3D"GRmark_2a8918bb64a478e856ca1cb5afead2ac=
8548260e_htmlunit:0" grphrase=3D"2a8918bb64a478e856ca1cb5afead2ac8548260e" =
grtype=3D"null">htmlunit</span> cannot work correctly with such buttons? An=
y "hacks" <span class=3D"GRcorrect" id=3D"GRmark_44e489f31e5747bb6616284f44=
4d38e566959920_to:0" grphrase=3D"44e489f31e5747bb6616284f444d38e566959920" =
grtype=3D"null">to</span>
    <span class=3D"GRcorrect" id=3D"GRmark_462312e07b54ef78ef9cc682ac2b726b=
eeeb2bdd_work:0" grphrase=3D"462312e07b54ef78ef9cc682ac2b726beeeb2bdd" grty=
pe=3D"null">work</span> with AjaxButton in multipart form?<br>
    <br>
    <br>
    <div class=3D"ecxmoz-signature">-- <br>
      Best regards=2C<br>
      <b>Roman Parkin</b><br>
      Testing Team Lead<br>
      <b><a href=3D"http://www.texunatech.com" target=3D"_blank">Texuna Tec=
hnologies Ltd</a></b><br>
      <font size=3D"1">
        This email is confidential and may also be privileged. If you
        <span class=3D"GRcorrect" id=3D"GRmark_1c7ff6cf0388646dc1333e45e9ae=
ddc8e7969c59_are:0" grphrase=3D"1c7ff6cf0388646dc1333e45e9aeddc8e7969c59" g=
rtype=3D"null">are</span> not the intended recipient please notify us immed=
iately and
        <span class=3D"GRcorrect" id=3D"GRmark_f04ca1b35203c4a6f74857841813=
efdf759edc72_delete:0" grphrase=3D"f04ca1b35203c4a6f74857841813efdf759edc72=
" grtype=3D"null">delete</span> this message from your system.<br>
        Help us to be environmentally responsible. Please do not print
        <span class=3D"GRcorrect" id=3D"GRmark_a84cf5f4f67790a412634f3f8a6f=
41cbc2609263_this:0" grphrase=3D"a84cf5f4f67790a412634f3f8a6f41cbc2609263" =
grtype=3D"null">this</span> email unless you need to. <br>
      </font>
    </div>
 =20

_______________________________________________
<span class=3D"GRcorrect" id=3D"GRmark_f30d92113e25a394e1f1a7dc69433cf0e68a=
2d81_WebTest:0" grphrase=3D"f30d92113e25a394e1f1a7dc69433cf0e68a2d81" grtyp=
e=3D"null">WebTest</span> mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest</div></div> 		 	   		  </di=
v></body>
</html>=

--_c8b7f89f-9d64-4dea-b3bc-e9caaa34d411_--