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