I am new to Selenium Remote Control (RC). My requirement is that I have to search Selenium from Google and find out how many results from www.seleniumhq.org are displayed in the first 10 results.
I tried:
int count = selenium.getXpathCount(
"xpath=//a[contains(@href,'www.seleniumhq.org')]"
).intValue();
But it gives the wrong count, since its counted links below www.seleniumhq.org; e.g download, selenium documentation, etc.
Correct count should be 2 since there is only 2 links which contains www.seleniumhq.org:
- www.seleniumhq.org
- www.seleniumhq.org/download/
Please suggest the solution.