Hi
I'm trying to click on a UI element that matches a variable, but due to inconsistencies I need it to be case insensitive.
The element in question is this:
<span class="k-in">Adam Smith<input id="useritem" name="useritem" type="hidden" value="9"></span>
This works apart from the case sensitivity:
div[Id="display-userhierarchy"] > div > ul > li > ul > li > div > span:contains(%UserFullName%)
Courtesy of some searching, I've found that the following works where the only issue is case, but I'm not overly happy with it as I'm likely to have other issues that would be better solved e.g. with regex instead.
(I also can't find references to the WA_ functions and am concerned that they are deprecated and exist only as backwards compatibility with Windows Automate?)
div[Id="display-userhierarchy"] > div > ul > li > ul > li > div > span:WA_SimpleTextEqualsIgnoreCase(%UserFullName%)
So, is anyone able to help me to do it with regex? I realise that I'll need to use i as the for case insensitivity, but can't work out what the syntax should be to use regex here.
Note that the text I'm searching for isn't the title or similar attribute, and it isn't so much regex itself that's the problem as to how to implement in this situation, ie the .net regex to match the span is simply "adam smith"i , I just don't know how to incorporate it!
Thanks in advance for any help!
Jonathan