Alexandre Garel wrote:

if I use the expression
//[EMAIL PROTECTED]'ARRAY1']//a[text() ='Nom'] selenium find the element
but if I use the expression
(//[EMAIL PROTECTED]'ARRAY1'])[1]//a[text() ='Nom'] selenium does not find the element
So it seems to me selenium Xpath lib does not handle parenthesis

Hi Alexandre.  Sorry for the late response.

Wow, I wasn't even aware that you could use parens within an XPath expression. There you go.
I would have expected a locator like

   xpath=(//[EMAIL PROTECTED]'stylee'])//th[text()='theHeaderText']/../td

to work in the current version of Selenium, but it doesn't. It turns out that this is because locateElementByXPath() short-circuits any path that doesn't start with "//". This dates back to when the locator functions were called one at a time until one of them worked, but it should no longer be necessary. I've logged the bug, and will get it fixed for 0.6. See http://jira.public.thoughtworks.org/browse/SEL-138

--
cheers, MikeW                            http://www.dogbiscuit.org/mdub/

_______________________________________________
Selenium-users mailing list
[email protected]
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to