Restrict the Number of digits in Generic Selector

I have a site with 3 names
Anaya malik
Anaya malik (929291)
Anaya malik (C929291)

the above order can vary. i need to click the one with name and 6 digit ID without “C”
I have this selector as

String.Format(""<html app='chrome.exe' title='{0}Workday' /><webctrl tag='DIV' aaname='Sales *epresentative' innertext='Sales *epresentative' title='* - Workday' />", str_EmpName)

this selector clicks the first available employee. how should i restrict this to select the one with name and 6 digtis ID?


for building the selector, can you share the screen where the link is
also if it is public url you can share the url


how can i insert this within a selector?


Can you share me the URL if it is public

Also share your screen where you are trying to click?


cannot share the URL


ok, share the screen and corresponding selectors of each you have given

Hope this helps in understanding your issue well


give a try on using a Regex driven Selector:

About the pattern, start with this:

Also check the detailed web element structure on specific element e.g. a for link, div, span. So the regex pattern maybe can be bound to an innertext.