[Webtest] How to verify title on the redirected page

Soula, William Soula, William" <wsoula@pointserve.com
Thu, 28 Aug 2008 06:57:38 -0500


--_000_93B3B6122B906D44BC7E8B8CEFB0DBBB1845168722SGPEXCHANGEpo_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Have you tried sleeping after you login to give the the redirected to page =
time to load?  You can even retry for awhile instead of doing a hard sleep =
for a long time.

<retry maxCount=3D"60">
    <sleep seconds=3D"3"/>
    <verifyTitle text=3D"Title of Redirected To page"/>
</retry>

________________________________
From: webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com] =
On Behalf Of Suzy Ng
Sent: Thursday, August 28, 2008 5:19 AM
To: webtest@lists.canoo.com
Subject: [Webtest] How to verify title on the redirected page

Hi,
I'm a new to webtest. I have a test which i need to verify the title on the=
 redirected page i.e.
I have a login page which i click to login, it will go to e.g. page A and t=
hen redirect to page B.
It takes ard 1min plus for the page to be redirected to page B. I want to v=
erify the title on page B.
But when i run my webtest, it verifies the title on page A.
I have set auto refresh true... not sure what else i should be doing.
The redirect code is as follow:

<SCRIPT LANGUAGE=3D"JavaScript">
<!--
function redirectTo(){
        var nextURL =3D "www.test.com....etc";
        location =3D nextURL;
}

//put a delay so that WA.GIF image will be logged in apache logs or else th=
e page will redirect too fast.
setTimeout("redirectTo()",100);

//->
</SCRIPT>

Please help.

Thanks.

________________________________
Share your beautiful moments with Photo Gallery. Windows Live Photo Gallery=
<http://get.live.com/photogallery/overview>

--_000_93B3B6122B906D44BC7E8B8CEFB0DBBB1845168722SGPEXCHANGEpo_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<STYLE>.hmmessage P {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; P=
ADDING-TOP: 0px
}
BODY.hmmessage {
	FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>

<META content=3D"MSHTML 6.00.6000.16705" name=3DGENERATOR></HEAD>
<BODY class=3Dhmmessage>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3D753065211-28082008>Have you tried sleeping after you login to give =
the the=20
redirected to page time to load?&nbsp; You can even retry for awhile instea=
d of=20
doing a hard sleep for a long time.</SPAN></FONT></DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3D753065211-28082008></SPAN></FONT>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3D753065211-28082008>&lt;retry maxCount=3D"60"&gt;</SPAN></FONT></DIV=
>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3D753065211-28082008>&nbsp;&nbsp;&nbsp; &lt;sleep=20
seconds=3D"3"/&gt;</SPAN></FONT></DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3D753065211-28082008>&nbsp;&nbsp;&nbsp; &lt;verifyTitle text=3D"Title=
 of=20
Redirected To page"/&gt;</SPAN></FONT></DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff><SPAN=20
class=3D753065211-28082008>&lt;/retry&gt;</SPAN></FONT></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma><B>From:</B> webtest-admin@lists.canoo.com=20
[mailto:webtest-admin@lists.canoo.com] <B>On Behalf Of </B>Suzy=20
Ng<BR><B>Sent:</B> Thursday, August 28, 2008 5:19 AM<BR><B>To:</B>=20
webtest@lists.canoo.com<BR><B>Subject:</B> [Webtest] How to verify title on=
 the=20
redirected page<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR>I'm a new to webtest. I have a test which i need to verif=
y the=20
title on the redirected page i.e.<BR>I have a login page which i click to l=
ogin,=20
it will go to e.g. page A and then redirect to page B.<BR>It takes ard 1min=
 plus=20
for the page to be redirected to page B. I want to verify the title on page=
=20
B.<BR>But when i run my webtest, it verifies the title on page A.<BR>I have=
 set=20
auto refresh true... not sure what else i should be doing.<BR>The redirect =
code=20
is as follow:<BR><PRE id=3Dline18>&lt;<SPAN class=3Dstart-tag>SCRIPT</SPAN>=
<SPAN class=3Dattribute-name> LANGUAGE</SPAN>=3D<SPAN class=3Dattribute-val=
ue>"JavaScript"</SPAN>&gt;<BR>&lt;!--<BR>function redirectTo(){<BR>	var nex=
tURL =3D "www.test.com....etc";<BR>	location =3D nextURL;<BR>}<BR><BR>//put=
 a delay so that WA.GIF image will be logged in apache logs or else the pag=
e will redirect too fast.<BR>setTimeout("redirectTo()",100);<BR><BR>//-&gt;=
<BR>&lt;/<SPAN class=3Dend-tag>SCRIPT</SPAN>&gt;</PRE><BR>Please=20
help.<BR><BR>Thanks.<BR><BR>
<HR>
Share your beautiful moments with Photo Gallery. <A=20
href=3D"http://get.live.com/photogallery/overview" target=3D_new>Windows Li=
ve Photo=20
Gallery</A> </BODY></HTML>

--_000_93B3B6122B906D44BC7E8B8CEFB0DBBB1845168722SGPEXCHANGEpo_--