Hi all,
I'm have a XPath that match a list of elements.
I can have the nb of elements using getXpathCount.
But I don't know how to reach the nth element in selenium.
I'm beginning with XPath, but it seems to me that there's not always a xpath corresponding to a nth XPath match.
my example :
"//div[@id='content_list']//div[@class='content_item']" return 10 elements how can I match the second one ?
and no "//div[@id='content_list']//div[@class='content_item'][2]" or "//div[@id='content_list']//div[@class='content_item' and position()=2]" are not working.
I think it's a recurrent problem seing this 2 others threads :
http://forums.openqa.org/thread.jspa?threadID=5023
http://forums.openqa.org/thread.jspa?messageID=28958焞
I've digged into selenium-browserbot.js, _findElementUsingFullXPath is returning "xpathResult.value[0]". I was wondering if we can try xpathResult.value[n]
But after looking in xpath.js, I'm not sure it's that simple...
Any Idea ?