[Webtest] Iteration through an XPath results set
Oster Nathan
webtest@lists.canoo.com
Sat, 3 Apr 2004 00:13:23 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C41910.7D129F00
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I'm a newbie to both XPath and WebTest, so I apologize if this is too
basic.
Is is possible to loop/iterate through the results of an XPath
expression that returns a set of elements?
For example, if the XPath expression returns a set of product href
links, can I iterate through all of them and call "verifylinks"?
If iteration through a results set is not possible, can someone please
provide me with an alternative test design for cases where you need to
validate a set of randomly generated page elements. This includes
verifying search results, product lists, a list of navbar buttons, etc.
Thanks!
Nate
------=_NextPart_000_0001_01C41910.7D129F00
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=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial size=3D2>I'm a =
newbie to both=20
XPath and WebTest, so I apologize if this is too =
basic.</FONT></SPAN></DIV>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial size=3D2>Is is =
possible to=20
loop/iterate through the results of an XPath expression that returns a =
set of=20
elements?</FONT></SPAN></DIV>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial size=3D2>For =
example, if the=20
XPath expression returns a set of product href links, can I iterate =
through all=20
of them and call "verifylinks"?</FONT></SPAN></DIV>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial size=3D2>If =
iteration through=20
a results set is not possible, can someone please provide me with an=20
alternative test design for cases where you need to validate a =
set of=20
randomly generated page elements. This includes verifying search =
results,=20
product lists, a list of navbar buttons, etc.</FONT></SPAN></DIV>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial=20
size=3D2>Thanks!</FONT></SPAN></DIV>
<DIV><SPAN class=3D530070405-03042004><FONT face=3DArial=20
size=3D2>Nate</FONT></SPAN></DIV></BODY></HTML>
------=_NextPart_000_0001_01C41910.7D129F00--