If your XPath is correct you would get 12, provided all 12 are present in the DOM at the time you do the call. I can't verify your XPath with seeing it and the HTML, but if Firebug verifies it then it probably is correct.
Is it possible the DOM is not completely built at the time you are doing the search?
You might need to wait until something is present that would only be there after what you are searching for has been completely rendered.
Mike
On Tuesday, March 5, 2013 8:27:34 AM UTC-8,
g.laxmi...@gmail.com wrote:
Hi,
I have a search scenario, where i will be entering some search string based on which i will get the results .
for example : If search for fan --> : i will get some 12 results for fan ..
however when i give something like
xpath of the search results ;--> which is actully poing to 12 results in Firebug :: xpath is correct .
mycode is looks like this :
List<WebElement>Options = driver.findElements(By.xpath("xpath of the search results"));
sysout(Options.size());
which is actually giving results as 5: which actually supposed to give 12;
onemore point : once the searh is done .. results willbe displayed after doing the scroll .. I mean results comes in scroll.. does it makes any difference .. ?
Pls help me ..