[Webtest] RE: Displaying pages modified by Javascript in Webtest results

Fly High Fly High <flyhigh172@hotmail.com>
Fri, 4 Jan 2008 11:57:38 -0500


--_660cee8f-7c36-4fcc-af21-d6686f09558f_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Thanks for the reply Marc,
=20
   I have tried the <sleep> option as well as a wait loop.  The page change=
s its title once the login has completed, but WebTest <verifyTitle> never s=
ees the title change.   I'm running version R_1646 which I downloaded yeste=
rday.
   A little more info on the app, in the "login window" when the "login" bu=
tton is clicked, a new window (appWindow) is created for the application.  =
The "login window" then establishes a "session" on a back end server and ex=
ecutes a appWindow.location.replace(sessionURL) to connect the application =
window to the back end session.  This effectively refreshes the appWindow w=
ith a new URL.  When this occurs, WebTest no longer see any changes in the =
appWindow.
=20
Here are the step I'm using (I've hidden the username and password) for thi=
s post:
=20
         <steps>            <invoke              description=3D"get Login P=
age"              url=3D"" />            <verifyTitle              descript=
ion=3D"we should see the LogiQuest login page title"              text=3D"L=
ogiQuest=AE - Logistics Research Service" />            <setInputField desc=
ription=3D"Set the Username" htmlid=3D"nUser" value=3D"***" />            <=
setInputField description=3D"Set the Password" htmlid=3D"nPass" value=3D"**=
*" />            <clickButton description=3D"Click the Login Button - this =
will open a new window" htmlid=3D"nLoginBtn" />            <verifyTitle des=
cription=3D"we should see the login title in the new window" text=3D"LogiQu=
est=AE Login" />            <verifyElementText description=3D"Check Progres=
s box text in the new window" htmlid=3D"nProgress" text=3D"Processing login=
 request. Please Wait." />                       <sleep description=3D"slee=
p for a second" seconds=3D"30"/>            <verifyTitle description=3D"Mai=
n application title again" text=3D"LogiQuest=AE - Logistics Research Servic=
e" />
         </steps>
=20
Here's the end of the output:
=20
=20
[setInputField]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: set=
InputField "Set the Username" (3/10)[setInputField]  INFO (com.canoo.webtes=
t.steps.Step) - >>>> Start Step: setInputField "Set the Password" (4/10)[cl=
ickButton]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: clickBut=
ton "Click the Login Button - this will open a new window" (5/10)[clickButt=
on]  INFO (com.canoo.webtest.steps.request.ClickButton) - -> findTarget(by =
input): name=3D value=3DL[clickButton]  INFO (com.canoo.webtest.engine.WebC=
lientContext) - Content of window changed to (url of new app window - remov=
ed for this post) (text/html)[clickButton]  INFO (com.canoo.webtest.engine.=
WebClientContext) - Content loaded in newly opened window, its content will=
 become current response[clickButton]  INFO (com.canoo.webtest.engine.WebCl=
ientContext) - Current form set to none[clickButton]  INFO (com.canoo.webte=
st.engine.WebClientContext) - Current response now: (url of new app window =
- removed for this post) (text/html)[clickButton]  INFO (com.canoo.webtest.=
engine.WebClientContext) - Content of window changed to (url of backend ses=
sion - removed for this post) (text/html)[clickButton]  INFO (com.canoo.web=
test.engine.WebClientContext) - Content of window changed with javascript, =
it will NOT become current response[verifyTitle]  INFO (com.canoo.webtest.s=
teps.Step) - >>>> Start Step: verifyTitle "we should see the login title in=
 the new window" (6/10)[verifyElementText]  INFO (com.canoo.webtest.steps.S=
tep) - >>>> Start Step: verifyElementText "Check Progress box text in the n=
ew window" (7/10)[verifyElementText]  INFO (com.canoo.webtest.steps.Step) -=
 >>>> Start Step: verifyElementText "Check Progress box text in the new win=
dow - this should fail" (9/10)[verifyTitle]  INFO (com.canoo.webtest.steps.=
Step) - >>>> Start Step: verifyTitle "Main application title again" (10/10)=
 INFO (com.canoo.webtest.engine.WebClientContext) - Responses restored INFO=
 (com.canoo.webtest.ant.WebtestTask) - Finished executing webtest "myTest" =
(C:\Program Files\Webtest\logintest.xml:7: ) INFO (com.canoo.webtest.ant.We=
btestTask) - No report to write according to config
=20
BUILD FAILEDC:\Program Files\Webtest\logintest.xml:29: Wrong document title=
 found!. Expected value "LogiQuest=AB - Logistics Research Service" but got=
 "LogiQuest=AB Login", Step: VerifyTitle at C:\Program Files\Webtest\logint=
est.xml:29:  with (taskName=3D"verifyTitle")
Total time: 42 seconds
=20
=20
> From: mguillemot@yahoo.fr> To: webtest@lists.canoo.com> Subject: Re: [Web=
test] RE: Displaying pages modified by Javascript in Webtest results> Date:=
 Fri, 4 Jan 2008 10:25:05 +0100> > Hi,> > the mail you mention only discuss=
 the pages presented in the reports,> this means that it doesn't help your =
login problem.> > Concerning your problem:> - which WebTest build do you us=
e?> - what happens if you add something like <sleep seconds=3D"5"/> (it's> =
quite extreme, but it's just to know)?> > Cheers,> Marc.> -- > Blog: http:/=
/mguillem.wordpress.com> > > Fly High wrote:> > Hello,> > > > This is my fi=
rst day with Webtest. My app. is AJAX based with the> > client side updated=
 via Javascript. I can't seem to get past the login> > page. After WebTest =
"clicks" the login button I get: "Content of window> > changed with javascr=
ipt, it will NOT become curent response". I can not> > get any further with=
 the testing after this point.> > > > I did some searching of the mail list=
 and found this: > > http://lists.canoo.com/pipermail/webtest/2006q4/007344=
.html (subject:> > Displaying pages modified by Javascript in Webtest resul=
ts) posted last> > year. Sounds like what I'm running into. Has any progres=
s been made on> > this front?> > > > Thanks,> > > > John> > > > -----------=
-------------------------------------------------------------> > Get the po=
wer of Windows + Web with the new Windows Live. Get it now!> > <http://www.=
windowslive.com?ocid=3DTXT_TAGHM_Wave2_powerofwindows_122007>> > __________=
_____________________________________> WebTest mailing list> WebTest@lists.=
canoo.com> http://lists.canoo.com/mailman/listinfo/webtest
_________________________________________________________________
Get the power of Windows + Web with the new Windows Live.
http://www.windowslive.com?ocid=3DTXT_TAGHM_Wave2_powerofwindows_012008=

--_660cee8f-7c36-4fcc-af21-d6686f09558f_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class=3D'hmmessage'>
Thanks for the reply Marc,<BR>
&nbsp;<BR>
&nbsp;&nbsp; I have tried the &lt;sleep&gt; option as well as a wait loop.&=
nbsp; The page changes its title once the login&nbsp;has completed, but Web=
Test &lt;verifyTitle&gt; never sees the title change.&nbsp;&nbsp; I'm runni=
ng version R_1646 which I downloaded yesterday.<BR><BR>
&nbsp;&nbsp;&nbsp;A little more info on the app, in the "login window"&nbsp=
;when the "login" button is clicked, a new window (app<FONT size=3D2>Window=
</FONT>) is created for the application.&nbsp; The "login window" then esta=
blishes a "session" on a back end server and executes&nbsp;a app<FONT size=
=3D2>Window.location.replace(sessionURL) to connect the application window =
to the back end session.&nbsp; This effectively refreshes the appWindow wit=
h a new URL.&nbsp; When this occurs, </FONT>WebTest no longer see any chang=
es in the appWindow.<BR>
&nbsp;<BR>
Here are the step I'm using (I've hidden the username and password) for thi=
s post:<BR>
&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;steps&gt;<BR>&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;invoke<BR>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 description=3D"get Login Page"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url=3D"" /&gt;<BR>&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;verifyTitle<BR>&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; des=
cription=3D"we should see the LogiQuest login page title"<BR>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text=3D"Lo=
giQuest=AE - Logistics Research Service" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;setInputField description=3D"=
Set the Username" htmlid=3D"nUser" value=3D"***" /&gt;<BR>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;setInputField descrip=
tion=3D"Set the Password" htmlid=3D"nPass" value=3D"***" /&gt;<BR>&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;clickButton d=
escription=3D"Click the Login Button - this will open a new window" htmlid=
=3D"nLoginBtn" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; &lt;verifyTitle description=3D"we should see the login titl=
e in the new window" text=3D"LogiQuest=AE Login" /&gt;<BR>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;verifyElementText des=
cription=3D"Check Progress box text in the new window" htmlid=3D"nProgress"=
 text=3D"Processing login request. Please Wait." /&gt;<BR>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;sleep description=3D"sleep for =
a second" seconds=3D"30"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; &lt;verifyTitle description=3D"Main application ti=
tle again" text=3D"LogiQuest=AE - Logistics Research Service" /&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/steps&gt;<BR>
&nbsp;<BR>
Here's the end of the output:<BR>
&nbsp;<BR>
&nbsp;<BR>
[setInputField]&nbsp; INFO (com.canoo.webtest.steps.Step) - &gt;&gt;&gt;&gt=
; Start Step: setInputField "Set the Username" (3/10)<BR>[setInputField]&nb=
sp; INFO (com.canoo.webtest.steps.Step) - &gt;&gt;&gt;&gt; Start Step: setI=
nputField "Set the Password" (4/10)<BR>[clickButton]&nbsp; INFO (com.canoo.=
webtest.steps.Step) - &gt;&gt;&gt;&gt; Start Step: clickButton "Click the L=
ogin Button - this will open a new window" (5/10)<BR>[clickButton]&nbsp; IN=
FO (com.canoo.webtest.steps.request.ClickButton) - -&gt; findTarget(by inpu=
t): name=3D value=3DL<BR>[clickButton]&nbsp; INFO (com.canoo.webtest.engine=
.WebClientContext) - Content of window changed to&nbsp;<A href=3D"http://tc=
idb1.terabase.com:9084/s2w001/frm_connect.html">(url</A> of new app window =
- removed for this post)&nbsp;(text/html)<BR>[clickButton]&nbsp; INFO (com.=
canoo.webtest.engine.WebClientContext) - Content loaded in newly opened win=
dow, its content will become current response<BR>[clickButton]&nbsp; INFO (=
com.canoo.webtest.engine.WebClientContext) - Current form set to none<BR>[c=
lickButton]&nbsp; INFO (com.canoo.webtest.engine.WebClientContext) - Curren=
t response now: <A href=3D"http://tcidb1.terabase.com:9084/s2w001/frm_conne=
ct.html">(url</A><FONT color=3D#444444> of new app window - removed for thi=
s post)&nbsp;(text/html)</FONT><BR>[clickButton]&nbsp; INFO (com.canoo.webt=
est.engine.WebClientContext) - Content of window changed to&nbsp;<A href=3D=
"http://tcidb1.terabase.com:9084/$S2W/s2w?LOGIN=3D&amp;1199465171912">(url<=
/A> of backend session - removed for this post)&nbsp;(text/html)<BR>[clickB=
utton]&nbsp; INFO (com.canoo.webtest.engine.WebClientContext) - Content of =
window changed with javascript, it will NOT become current response<BR>[ver=
ifyTitle]&nbsp; INFO (com.canoo.webtest.steps.Step) - &gt;&gt;&gt;&gt; Star=
t Step: verifyTitle "we should see the login title in the new window" (6/10=
)<BR>[verifyElementText]&nbsp; INFO (com.canoo.webtest.steps.Step) - &gt;&g=
t;&gt;&gt; Start Step: verifyElementText "Check Progress box text in the ne=
w window" (7/10)<BR>[verifyElementText]&nbsp; INFO (com.canoo.webtest.steps=
.Step) - &gt;&gt;&gt;&gt; Start Step: verifyElementText "Check Progress box=
 text in the new window - this should fail" (9/10)<BR>[verifyTitle]&nbsp; I=
NFO (com.canoo.webtest.steps.Step) - &gt;&gt;&gt;&gt; Start Step: verifyTit=
le "Main application title again" (10/10)<BR>&nbsp;INFO (com.canoo.webtest.=
engine.WebClientContext) - Responses restored<BR>&nbsp;INFO (com.canoo.webt=
est.ant.WebtestTask) - Finished executing webtest "myTest" (C:\Program File=
s\Webtest\logintest.xml:7: )<BR>&nbsp;INFO (com.canoo.webtest.ant.WebtestTa=
sk) - No report to write according to config<BR>
&nbsp;<BR>
BUILD FAILED<BR>C:\Program Files\Webtest\logintest.xml:29: Wrong document t=
itle found!. Expected value "LogiQuest=AB - Logistics Research Service" but=
&nbsp;got "LogiQuest=AB Login", Step: VerifyTitle at C:\Program Files\Webte=
st\logintest.xml:29:&nbsp; with (taskName=3D"verifyTitle")<BR>
Total time: 42 seconds<BR>
&nbsp;<BR>
&nbsp;<BR>
<BR>&gt; From: mguillemot@yahoo.fr<BR>&gt; To: webtest@lists.canoo.com<BR>&=
gt; Subject: Re: [Webtest] RE: Displaying pages modified by Javascript in W=
ebtest results<BR>&gt; Date: Fri, 4 Jan 2008 10:25:05 +0100<BR>&gt; <BR>&gt=
; Hi,<BR>&gt; <BR>&gt; the mail you mention only discuss the pages presente=
d in the reports,<BR>&gt; this means that it doesn't help your login proble=
m.<BR>&gt; <BR>&gt; Concerning your problem:<BR>&gt; - which WebTest build =
do you use?<BR>&gt; - what happens if you add something like &lt;sleep seco=
nds=3D"5"/&gt; (it's<BR>&gt; quite extreme, but it's just to know)?<BR>&gt;=
 <BR>&gt; Cheers,<BR>&gt; Marc.<BR>&gt; -- <BR>&gt; Blog: http://mguillem.w=
ordpress.com<BR>&gt; <BR>&gt; <BR>&gt; Fly High wrote:<BR>&gt; &gt; Hello,<=
BR>&gt; &gt; <BR>&gt; &gt; This is my first day with Webtest. My app. is AJ=
AX based with the<BR>&gt; &gt; client side updated via Javascript. I can't =
seem to get past the login<BR>&gt; &gt; page. After WebTest "clicks" the lo=
gin button I get: "Content of window<BR>&gt; &gt; changed with javascript, =
it will NOT become curent response". I can not<BR>&gt; &gt; get any further=
 with the testing after this point.<BR>&gt; &gt; <BR>&gt; &gt; I did some s=
earching of the mail list and found this: <BR>&gt; &gt; http://lists.canoo.=
com/pipermail/webtest/2006q4/007344.html (subject:<BR>&gt; &gt; Displaying =
pages modified by Javascript in Webtest results) posted last<BR>&gt; &gt; y=
ear. Sounds like what I'm running into. Has any progress been made on<BR>&g=
t; &gt; this front?<BR>&gt; &gt; <BR>&gt; &gt; Thanks,<BR>&gt; &gt; <BR>&gt=
; &gt; John<BR>&gt; &gt; <BR>&gt; &gt; ------------------------------------=
------------------------------------<BR>&gt; &gt; Get the power of Windows =
+ Web with the new Windows Live. Get it now!<BR>&gt; &gt; &lt;http://www.wi=
ndowslive.com?ocid=3DTXT_TAGHM_Wave2_powerofwindows_122007&gt;<BR>&gt; <BR>=
&gt; _______________________________________________<BR>&gt; WebTest mailin=
g list<BR>&gt; WebTest@lists.canoo.com<BR>&gt; http://lists.canoo.com/mailm=
an/listinfo/webtest<BR><BR><br /><hr />Get the power of Windows + Web with =
the new Windows Live. <a href=3D'http://www.windowslive.com?ocid=3DTXT_TAGH=
M_Wave2_powerofwindows_012008' target=3D'_new'>Get it now!</a></body>
</html>=

--_660cee8f-7c36-4fcc-af21-d6686f09558f_--