Xpath: string functions not working fine



I am new to xpath and have been wandering on the www for a long time to get the answer. Found some links but couldn't get the answer.


I have the following xpath for a particular scenario and it is working fine



//li[contains(@class,'category_')]/a[contains(@href,'suits')]


Now when I tried to do the above thing using string function for learning purpose, it is not working. I tried the following xpath as the alternative.



//li[contains(@class,'category_')]/a[contains(@href,lower-case("SUITS"))]
//li[contains(@class,'category_')]/a[contains(@href,lower-case('SUITS'))]


What am I doing wrong here? Please help.


No comments:

Post a Comment