I'm using Firefox's XPath-checker and can't get the syntax right. I have a link:
<a>LinkName</a>
and I try doing:
//a[lower-case(child::text())='linkname']
but I have a syntax error. What am I doing wrong?
Thanks
I'm using Firefox's XPath-checker and can't get the syntax right. I have a link:
<a>LinkName</a>
and I try doing:
//a[lower-case(child::text())='linkname']
but I have a syntax error. What am I doing wrong?
Thanks
There is no function called lower-case
in XPath 1.0 which is the version of XPath used in Firefox.
You need to use the ugly Translate
function instead:-
Translate(text(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')
but of course you would need to extend this if you need coverage of a wider characte-set.