Xpath not case sensitive

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
swmatisa
Posts: 122
Joined: Fri Aug 05, 2011 7:52 am

Xpath not case sensitive

Post by swmatisa » Fri Sep 30, 2011 12:53 pm

Code: Select all

tree/treeitem[@accessiblename=$machine]
My problem is that I need a non case sensitive equality with the variable($machine) content. Is this possible?

I see that there is regex, but how put the variable $machine in the regex?

Thans for your help

Regards
SW

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Xpath not case sensitive

Post by Ciege » Fri Sep 30, 2011 3:49 pm

Try something like this:

Code: Select all

tree/treeitem[@accessiblename~'" + machine + "']
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

swmatisa
Posts: 122
Joined: Fri Aug 05, 2011 7:52 am

Re: Xpath not case sensitive

Post by swmatisa » Tue Oct 04, 2011 7:48 am

Hello,

The working solution is:

Code: Select all

tree/treeitem[@accessiblename~'(?i:'+$machine+')']
SW