Lower-case function in xpath

Is there any option of lowercase xpath in the Appium-Studio.

Current i m using this
mElement = driver
.findElementByXPath(“xpath=//*[contains(@text,‘Back button’) or contains(@text,‘Back Button’)]”);

I know that the substitute of the lowercase is “translate” but …this is available or not.

Hi

you can use the xpath ignore case function

mElement = driver
.findElementByXPath("xpath=//*[cmd:matches(@text,'back button','i']");

the ‘i’ stands for ignore case

i think this xpath is wrong
i have tried it

Please check again

Yeah you are right

Please use

xpath = //*[cmd:matches(@text,'(?i)back button')]

Great @Tom

its working

1 Like