The HTML Example Document
<div> <ol> <li> <a title="Self Catering Apartments" href="http://www.ooo.coo">Self Catering Apartments</a> </li> <li> <a title="Vacation Accommodation" href="http://www.ooo.coo">Vacation Accommodation</a> </li> <li> <a title="Hotel" href="http://www.ooo.coo">Hotel</a> </li> <li> <a title="Real Estate" href="http://www.ooo.coo">Real Estate</a> </li> </ol> </div>
Uisng xpath to verify all the a tag elements
xpath = //div/ol/*/a[@href]
This will return all the a tag elements
In selenium you can use this command to verify if the elements have the href
<tr>
<td>verifyElementPresent</td>
<td>xpath = //div/ol/*/a[contains(@href, 'http://www')]</td>
<td></td>
</tr>
Submitted by Puddupakkam Pavandeep
