2 messages in com.canoo.lists.webtestRE: [Webtest] possible to recursively...
FromSent OnAttachments
Kevin Casey20 Mar 2008 09:46 
Soula, William20 Mar 2008 10:08 
Subject:RE: [Webtest] possible to recursively walk HTML element, verifying links?
From:Soula, William (wso@pointserve.com)
Date:03/20/2008 10:08:39 AM
List:com.canoo.lists.webtest

Try using the repeat step and an xpath that points to your ul and then verify
the link in the steps to repeat. Here is an example that will go through all
inputs of type checkbox and check the checkbox:

<repeat xpath="//tbody[@id='mdp']/tr/td[1]/input[@type='checkbox']"
counterName="currentCheckbox" description="Check all Plans"> <setCheckbox xpath="$currentCheckbox" checked="true"/> </repeat>

William Soula QA Analyst

Pointserve, Inc. 110 Wild Basin Road Suite 300 Austin, Texas 78746 O: 512.617.5311 F: 512.617.0466

-----Original Message----- From: webt@lists.canoo.com [mailto:webt@lists.canoo.com] On
Behalf Of Kevin Casey Sent: Thursday, March 20, 2008 11:47 AM To: webt@lists.canoo.com Subject: [Webtest] possible to recursively walk HTML element, verifying links?

Hi, I'm brand new to Webtest. I have an HTML structure that's like

<ul id="foo"> <li><a href="a.html">a</a></li> <li><a href="b.html">b</a></li> <li><a href="c.html">c</a> <ul id="c-foo"> <li><a href="c-1.html">c-1</a></li> <li><a href="c-2.html">c-2</a></li> </ul> </li> <li><a href="d.html">d</a></li> </ul>

...and so on. Sometimes with a 2nd nested UL (never a 3rd, though), sometimes
without. Is there a way to recursively walk through the entire UL, verifying all
links that are found?

Thanks!