verifyXpathCount(xpath, pattern)
Generated from getXpathCount(xpath)
Arguments:
* xpath – the xpath expression to evaluate. do NOT wrap this expression in a ‘count()’ function; we will do that for you.
Returns:
the number of nodes that match the specified xpath
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