Selenium – verifyXpathCount 

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

Returns the number of nodes that match the specified xpath, eg. “//table” would give
the number of tables.
Selenium waitForXpathCount example

<tr>
<td>verifyXpathCount</td>
<td>//span[3]/a</td>
<td>30</td>
</tr>

In this example we to verify for the xpath value  //span[3]/a to be available on the page for 30 times.


Author: Pavandeep Puddupakkam on May 2, 2010
Category: Selenium IDE, Selenium RC, Software Testing
Tags: , , ,
Google Webdriver Forum -The Online Community for Google Webdriver and Selenium RC Users and Professionals

Leave a Reply

Last articles