Xpath error with not() and ends-with()

I have the following Xpath expression:

//*[not(input)][ends-with(@*, 'Copyright')]

I expect it to give me all elements - except input - with any attribute value which ends with "Copyright".

I execute it in the Selenium 2 Java API with webDriver.findElements(By.xpath(expression)) and get the following error:

The expression is not a legal expression

But these expressions work without trouble:

//*[not(input)][starts-with(@*, 'Copyright')]
//*[ends-with(@*, 'Copyright')]

Any ideas?

7
задан Alp 29 May 2011 в 11:17
поделиться