[Webtest] How to verify title on the redirected page

Conor MacMahon Conor MacMahon" <Conor.MacMahon@qsa.qld.edu.au
Fri, 29 Aug 2008 14:47:49 +1000


This is a multi-part message in MIME format.

------_=_NextPart_001_01C90992.636741CF
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi Hari,
            There is a name clash for one of the tasks in
webtest/ant-contrib. It may be unset, and from memory I thought there
was a work-around, but maybe not. In this case, you would not be
referencing that specific task, so it should not be an issue, no?
            Have just ran webtest and ant-contrib via ant, and yes, it
all works fine, so long as you don't use both of the same tasks.
Best,
Conor

________________________________

From: Harihara Vinayakaram [mailto:hvram1@gmail.com] 
Sent: Friday, 29 August 2008 12:59 PM
To: webtest@lists.canoo.com; Conor MacMahon
Subject: Re: [Webtest] How to verify title on the redirected page


Hi
   I have some experience with antContrib and webtest . But they
generally don't go together too well. 

   There is a bug logged in JIRA which has the same problem that I faced
:
unset and webtest don't work together .

Just my 0.02$ so that you don't spend too much time trying to figure out
why things are not working as they should be

Regards
Hari


On Fri, Aug 29, 2008 at 4:28 AM, Conor MacMahon
<Conor.MacMahon@qsa.qld.edu.au> wrote:


	Hi Suzy,
	            Do you want to measure the time, in that you want to
error out if it exceeds a certain amount of seconds? Or just measure the
time in general, and then give this feedback? For the former, you could
easily use the 'timedGroup' functionality in webtest
(http://webtest.canoo.com/webtest/manual/timedGroup.html).
	            For the latter, you could use two tools via ant,
https://antutility.dev.java.net/ and
http://ant-contrib.sourceforge.net/tasks/tasks/performance_monitor.html.
Both will log out how long a particular task took, which is then logged
out, and hence you can read. I've used ant-contrib, and must admit it
has quite a few other handy tools that one would use now and again (i.e.
if/else statements, try-catch, etc.).
	            From your requirements (i.e. wanting to have the
most accurate time measurement), sounds like you need to use the
retry/sleep below of wsoula@pointserve.com below, and set the sleep
seconds to 1 second or lower order, to increase accuracy. And if that
run doesn't give you feedback in the ant log, use
http://ant-contrib.sourceforge.net/tasks/tasks/performance_monitor.html
to ensure you do get that feedback.
	HTH,
	Conor

________________________________

	
	From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Suzy Ng
	
	Sent: Thursday, 28 August 2008 10:41 PM 

	To: webtest@lists.canoo.com
	Subject: RE: [Webtest] How to verify title on the redirected
page
	

	Hi,
	i have thought of doing that, but i also need to measure the
time taken for the redirected page to load.
	So if i use this method the measurement might not be accurate.
	So i'm wondering if there are any other ways to do that.
	
	Thanks!
	
	
	
	
________________________________

	From: wsoula@pointserve.com
	To: webtest@lists.canoo.com
	Subject: RE: [Webtest] How to verify title on the redirected
page
	Date: Thu, 28 Aug 2008 06:57:38 -0500
	
	
	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="60">
	    <sleep seconds="3"/>
	    <verifyTitle text="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 then redirect to page B.
	It takes ard 1min plus for the page to be redirected to page B.
I want to verify 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="JavaScript">
	<!--
	function redirectTo(){
		var nextURL = "www.test.com....etc";
		location = nextURL;
	
	}
	
	//put a delay so that WA.GIF image will be logged in apache logs
or else the 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>  
	
________________________________

	Share your beautiful moments with Photo Gallery. Windows Live
Photo Gallery <http://get.live.com/photogallery/overview>  
	
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	This email (including any attached files) is for the intended 
	recipient(s) only. If you received this email by mistake,
please, 
	as a courtesy, tell the sender, then delete this email.
	
	The views and opinions are the originator's and do not
necessarily 
	reflect those of the Queensland Studies Authority. All
reasonable 
	precautions have been taken to ensure that this email contained
no 
	viruses at the time it was sent. 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email (including any attached files) is for the intended 
recipient(s) only. If you received this email by mistake, please, 
as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily 
reflect those of the Queensland Studies Authority. All reasonable 
precautions have been taken to ensure that this email contained no 
viruses at the time it was sent.
 

------_=_NextPart_001_01C90992.636741CF
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<HTML xmlns:eXclaimer=3D"http://www.exclaimer.co.uk">
<HEAD>
<META http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3DUTF-16">

<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.6000.16608" name=3DGENERATOR></HEAD><BODY =
><DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D303322703-29082008><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Hi Hari,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN=20
class=3D303322703-29082008>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
<FONT face=3DArial color=3D#0000ff size=3D2>There is a name clash for =
one of the tasks=20
in webtest/ant-contrib. It may be unset, and from memory I thought there =
was a=20
work-around, but maybe not. In this case, you would not be referencing =
that=20
specific&nbsp;task, so it should not be an issue, =
no?</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D303322703-29082008><FONT =
face=3DArial=20
color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; Have=20
just ran webtest and ant-contrib via ant, and yes, it all works fine, so =
long as=20
you don't use both of the same tasks.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D303322703-29082008><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Best,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D303322703-29082008><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Conor</FONT></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B> Harihara Vinayakaram=20
[mailto:hvram1@gmail.com] <BR><B>Sent:</B> Friday, 29 August 2008 12:59=20
PM<BR><B>To:</B> webtest@lists.canoo.com; Conor =
MacMahon<BR><B>Subject:</B> Re:=20
[Webtest] How to verify title on the redirected =
page<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=3Dltr>Hi<BR>&nbsp;&nbsp; I have some experience with antContrib =
and=20
webtest . But they generally don't go together too well. =
<BR><BR>&nbsp;&nbsp;=20
There is a bug logged in JIRA which has the same problem that I faced =
:<BR>unset=20
and webtest don't work together .<BR><BR>Just my 0.02$ so that you don't =
spend=20
too much time trying to figure out why things are not working as they =
should=20
be<BR><BR>Regards<BR>Hari<BR><BR>
<DIV class=3Dgmail_quote>On Fri, Aug 29, 2008 at 4:28 AM, Conor MacMahon =
<SPAN=20
dir=3Dltr>&lt;<A=20
href=3D"mailto:Conor.MacMahon@qsa.qld.edu.au">Conor.MacMahon@qsa.qld.edu.=
au</A>&gt;</SPAN>=20
wrote:<BR>
<BLOCKQUOTE class=3Dgmail_quote=20
style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: =
rgb(204,204,204) 1px solid">
  <DIV>
  <DIV>
  <DIV dir=3Dltr align=3Dleft><SPAN><FONT face=3DArial =
color=3D#0000ff>Hi=20
  Suzy,</FONT></SPAN></DIV>
  <DIV dir=3Dltr align=3Dleft><SPAN><FONT=20
  =
color=3D#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
  <FONT face=3DArial>Do you want to measure the time, in that you want =
to error=20
  out if it exceeds a certain amount of seconds? Or just measure the =
time in=20
  general, and then give this feedback?&nbsp;For the former, you could =
easily=20
  use the 'timedGroup' functionality in webtest (<A=20
  href=3D"http://webtest.canoo.com/webtest/manual/timedGroup.html"=20
  =
target=3D_blank>http://webtest.canoo.com/webtest/manual/timedGroup.html</=
A>).</FONT></FONT></SPAN></DIV>
  <DIV dir=3Dltr align=3Dleft><SPAN><FONT=20
  =
color=3D#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
  <FONT face=3DArial>For the latter, you could use two tools via ant, <A =

  href=3D"https://antutility.dev.java.net/"=20
  target=3D_blank>https://antutility.dev.java.net/</A>&nbsp;and <A=20
  =
href=3D"http://ant-contrib.sourceforge.net/tasks/tasks/performance_monito=
r.html"=20
  =
target=3D_blank>http://ant-contrib.sourceforge.net/tasks/tasks/performanc=
e_monitor.html</A>.=20
  Both will log out how long a particular task took, which is then =
logged out,=20
  and hence you can read. I've used ant-contrib, and must admit it has =
quite a=20
  few other handy tools that one would use now and again (i.e. if/else=20
  statements, try-catch, etc.).</FONT></FONT></SPAN></DIV>
  <DIV dir=3Dltr align=3Dleft><SPAN><FONT=20
  =
color=3D#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
  <FONT face=3DArial>From your requirements (i.e. wanting to have the =
most=20
  accurate time measurement), sounds like you need to use the =
retry/sleep below=20
  of <A href=3D"mailto:wsoula@pointserve.com"=20
  target=3D_blank>wsoula@pointserve.com</A> below, and set the sleep =
seconds to 1=20
  second or lower order, to increase accuracy. And if that run doesn't =
give you=20
  feedback in the ant log, use <A=20
  =
href=3D"http://ant-contrib.sourceforge.net/tasks/tasks/performance_monito=
r.html"=20
  =
target=3D_blank>http://ant-contrib.sourceforge.net/tasks/tasks/performanc=
e_monitor.html</A>&nbsp;to=20
  ensure you do get that feedback.</FONT></FONT></SPAN></DIV>
  <DIV dir=3Dltr align=3Dleft><SPAN><FONT face=3DArial=20
  color=3D#0000ff>HTH,</FONT></SPAN></DIV>
  <DIV dir=3Dltr align=3Dleft><SPAN><FONT face=3DArial=20
  color=3D#0000ff>Conor</FONT></SPAN></DIV><BR>
  <DIV lang=3Den-us dir=3Dltr align=3Dleft>
  <HR>
  <FONT face=3DTahoma>
  <DIV class=3DIh2E3d><B>From:</B> <A =
href=3D"mailto:webtest-admin@lists.canoo.com"=20
  target=3D_blank>webtest-admin@lists.canoo.com</A> [mailto:<A=20
  href=3D"mailto:webtest-admin@lists.canoo.com"=20
  target=3D_blank>webtest-admin@lists.canoo.com</A>] <B>On Behalf Of =
</B>Suzy=20
  Ng<BR></DIV><B>Sent:</B> Thursday, 28 August 2008 10:41 PM=20
  <DIV>
  <DIV></DIV>
  <DIV class=3DWj3C7c><BR><B>To:</B> <A =
href=3D"mailto:webtest@lists.canoo.com"=20
  target=3D_blank>webtest@lists.canoo.com</A><BR><B>Subject:</B> RE: =
[Webtest] How=20
  to verify title on the redirected =
page<BR></DIV></DIV></FONT><BR></DIV>
  <DIV>
  <DIV></DIV>
  <DIV class=3DWj3C7c>
  <DIV></DIV>Hi,<BR>i have thought of doing that, but i also need to =
measure the=20
  time taken for the redirected page to load.<BR>So if i use this method =
the=20
  measurement might not be accurate.<BR>So i'm wondering if there are =
any other=20
  ways to do that.<BR><BR>Thanks!<BR><BR><BR><BR>
  <HR>
  From: <A href=3D"mailto:wsoula@pointserve.com"=20
  target=3D_blank>wsoula@pointserve.com</A><BR>To: <A=20
  href=3D"mailto:webtest@lists.canoo.com"=20
  target=3D_blank>webtest@lists.canoo.com</A><BR>Subject: RE: [Webtest] =
How to=20
  verify title on the redirected page<BR>Date: Thu, 28 Aug 2008 06:57:38 =

  -0500<BR><BR>
  <DIV dir=3Dltr align=3Dleft><FONT face=3DArial =
color=3D#0000ff><SPAN>Have you tried=20
  sleeping after you login to give the the redirected to page time to=20
  load?&nbsp; You can even retry for awhile instead of doing a hard =
sleep for a=20
  long time.</SPAN></FONT></DIV>
  <DIV dir=3Dltr align=3Dleft><FONT face=3DArial=20
  color=3D#0000ff><SPAN></SPAN></FONT>&nbsp;</DIV>
  <DIV dir=3Dltr align=3Dleft><FONT face=3DArial =
color=3D#0000ff><SPAN>&lt;retry=20
  maxCount=3D"60"&gt;</SPAN></FONT></DIV>
  <DIV dir=3Dltr align=3Dleft><FONT face=3DArial=20
  color=3D#0000ff><SPAN>&nbsp;&nbsp;&nbsp; &lt;sleep=20
  seconds=3D"3"/&gt;</SPAN></FONT></DIV>
  <DIV dir=3Dltr align=3Dleft><FONT face=3DArial=20
  color=3D#0000ff><SPAN>&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=20
  color=3D#0000ff><SPAN>&lt;/retry&gt;</SPAN></FONT></DIV><BR>
  <DIV lang=3Den-us dir=3Dltr align=3Dleft>
  <HR>
  <FONT face=3DTahoma><B>From:</B> <A =
href=3D"mailto:webtest-admin@lists.canoo.com"=20
  target=3D_blank>webtest-admin@lists.canoo.com</A> [mailto:<A=20
  href=3D"mailto:webtest-admin@lists.canoo.com"=20
  target=3D_blank>webtest-admin@lists.canoo.com</A>] <B>On Behalf Of =
</B>Suzy=20
  Ng<BR><B>Sent:</B> Thursday, August 28, 2008 5:19 AM<BR><B>To:</B> <A=20
  href=3D"mailto:webtest@lists.canoo.com"=20
  target=3D_blank>webtest@lists.canoo.com</A><BR><B>Subject:</B> =
[Webtest] How to=20
  verify title on the redirected page<BR></FONT><BR></DIV>
  <DIV></DIV>Hi,<BR>I'm a new to webtest. I have a test which i need to =
verify=20
  the title on the redirected page i.e.<BR>I have a login page which i =
click to=20
  login, it will go to e.g. page A and then redirect to page B.<BR>It =
takes ard=20
  1min plus for the page to be redirected to page B. I want to verify =
the title=20
  on page B.<BR>But when i run my webtest, it verifies the title on page =
A.<BR>I=20
  have set auto refresh true... not sure what else i should be =
doing.<BR>The=20
  redirect code is as follow:<BR><PRE>&lt;<SPAN>SCRIPT</SPAN><SPAN> =
LANGUAGE</SPAN>=3D<SPAN>"JavaScript"</SPAN>&gt;<BR>&lt;!--<BR>function =
redirectTo(){<BR>	var nextURL =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 page will redirect too =
fast.<BR>setTimeout("redirectTo()",100);<BR><BR>//-&gt;<BR>&lt;/<SPAN>SCR=
IPT</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_blank>Windows Live=20
  Photo Gallery</A> <BR>
  <HR>
  Share your beautiful moments with Photo Gallery. <A=20
  href=3D"http://get.live.com/photogallery/overview" =
target=3D_blank>Windows Live=20
  Photo Gallery</A> =
</DIV></DIV></DIV><PRE>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~~~~~~~~~~~~~~~
This email (including any attached files) is for the intended=20
recipient(s) only. If you received this email by mistake, please,=20
as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily=20
reflect those of the Queensland Studies Authority. All reasonable=20
precautions have been taken to ensure that this email contained no=20
viruses at the time it was sent.
</PRE></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV>
<PRE>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email (including any attached files) is for the intended=20
recipient(s) only. If you received this email by mistake, please,=20
as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily=20
reflect those of the Queensland Studies Authority. All reasonable=20
precautions have been taken to ensure that this email contained no=20
viruses at the time it was sent.
</PRE></BODY></HTML>

------_=_NextPart_001_01C90992.636741CF--