[Webtest] Pausing for Javascript to update the html

Marlon Palo Marlon Palo <marlonpalo@hotmail.com>
Wed, 9 Jan 2013 09:04:58 +0800


--_1423c387-c71c-4a73-bcad-cbcf419559bd_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable


How about putting the previousResponse before the verifyText?

<previousResponse></previousResponse>

But I'm not quite sure if it will work.

Marlon
From: robert.m.gary@hp.com
To: webtest@lists.canoo.com
Subject: [Webtest] Pausing for Javascript to update the html
Date: Tue=2C 8 Jan 2013 23:02:23 +0000









I=92m testing an ExtJS application. The HTML loaded has no content other th=
an a reference to the ExtJS Javascript code. So if I just use <invoke> to l=
oad my page its initially blank until the Javascript has a second to update=
 it. Using sleep
 results in the following message=85
=20
=93Content of window changed with javascript=2C it will NOT become current =
response=94

=20
However=2C that is exactly what I want=2C I want the javascript change to b=
ecome the current response. How do I do that??
=20
    <target name=3D"wt.testInWork">
        <webtest name=3D"my simple Test">
            <steps>
                <invoke url=3D"http://localhost:8080/development/commonComp=
onents/superfield/test.html"
                        description=3D"Go to Google (in English)"/>
                <sleep seconds=3D"30"/>
                <verifyText text=3D"SuperField"/>=20
=DF- only available after the Javascript has a few seconds to run
            </steps>
        </webtest>
    </target>
=20
-Robert
 		 	   		  =

--_1423c387-c71c-4a73-bcad-cbcf419559bd_
Content-Type: text/html; charset="Windows-1252"
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'>
How about putting the previousResponse before the verifyText?<br><br>&lt=3B=
previousResponse&gt=3B&lt=3B/previousResponse&gt=3B<br><br>But I'm not quit=
e sure if it will work.<br><br>Marlon<br><div><div id=3D"SkyDrivePlaceholde=
r"></div><hr id=3D"stopSpelling">From: robert.m.gary@hp.com<br>To: webtest@=
lists.canoo.com<br>Subject: [Webtest] Pausing for Javascript to update the =
html<br>Date: Tue=2C 8 Jan 2013 23:02:23 +0000<br><br>



<style><!--
.ExternalClass p.ecxMsoNormal=2C .ExternalClass li.ecxMsoNormal=2C .Externa=
lClass div.ecxMsoNormal
{margin-bottom:.0001pt=3Bfont-size:11.0pt=3Bfont-family:"Calibri"=2C"sans-s=
erif"=3B}
.ExternalClass a:link=2C .ExternalClass span.ecxMsoHyperlink
{color:blue=3Btext-decoration:underline=3B}
.ExternalClass a:visited=2C .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple=3Btext-decoration:underline=3B}
.ExternalClass span.ecxEmailStyle17
{font-family:"Calibri"=2C"sans-serif"=3Bcolor:windowtext=3B}
.ExternalClass .ecxMsoChpDefault
{=3B}
@page WordSection1
{size:8.5in 11.0in=3B}
.ExternalClass div.ecxWordSection1
{page:WordSection1=3B}

--></style>


<div class=3D"ecxWordSection1">
<p class=3D"ecxMsoNormal">I=92m testing an ExtJS application. The HTML load=
ed has no content other than a reference to the ExtJS Javascript code. So i=
f I just use &lt=3Binvoke&gt=3B to load my page its initially blank until t=
he Javascript has a second to update it. Using sleep
 results in the following message=85</p>
<p class=3D"ecxMsoNormal">&nbsp=3B</p>
<p class=3D"ecxMsoNormal">=93Content of window changed with javascript=2C i=
t will NOT become current response=94
</p>
<p class=3D"ecxMsoNormal">&nbsp=3B</p>
<p class=3D"ecxMsoNormal">However=2C that is exactly what I want=2C I want =
the javascript change to become the current response. How do I do that??</p=
>
<p class=3D"ecxMsoNormal">&nbsp=3B</p>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B &lt=3Btarget name=3D"wt.=
testInWork"&gt=3B</p>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B &lt=3Bwebtest name=3D"my simple Test"&gt=3B</p>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B &lt=3Bsteps&gt=3B</p>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B &lt=
=3Binvoke url=3D"http://localhost:8080/development/commonComponents/superfi=
eld/test.html"</p>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B &nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3Bdescription=3D=
"Go to Google (in English)"/&gt=3B</p>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B &lt=
=3Bsleep seconds=3D"30"/&gt=3B</p>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B &lt=
=3BverifyText text=3D"SuperField"/&gt=3B <span style=3D"font-family:Wingdin=
gs">
=DF</span>- only available after the Javascript has a few seconds to run</p=
>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B &lt=3B/steps&gt=3B</p>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B &lt=3B/webtest&gt=3B</p>
<p class=3D"ecxMsoNormal">&nbsp=3B&nbsp=3B&nbsp=3B &lt=3B/target&gt=3B</p>
<p class=3D"ecxMsoNormal">&nbsp=3B</p>
<p class=3D"ecxMsoNormal">-Robert</p>
</div></div> 		 	   		  </div></body>
</html>=

--_1423c387-c71c-4a73-bcad-cbcf419559bd_--