UiPath Selectors - Use of OR condition in title

Hello Robot experts,

I am automating a windows application, when I access the module screen ‘A’ the title of the screen shows ‘Borrow Lending’ sometimes and other times shows different title ‘Repo’

Now, I would like to handle this in selector to identify when the title is ‘Borrow Lending’ or ‘Repo’. Is there any option to use OR operator ? I have found some solution using regex but this did not work.

Regex expression used:

Please assit.

Thank you.

Hi,

Can you share your selector string?

Regex selector will be the following.

 title='.*(Repo|Borrow Lending).*'  matching:title='regex' 

Regards.

1 Like

Hi @rdinesh0331
Ok you can built another approach.
Get title and put if-condition and then use selector according to if-condition

Hello @rdinesh0331

Please refer to the below post.

Thanks

Thanks, did not work.
Here is the selector code:

<wnd app='exceed.exe' cls='EXCEEDW:MWCLIENT0' title='.*(Repo|Borrow Lending).*' matching:title='regex' />
<ctrl name='Maximize' role='push button' />

Use Get Attribute to get the title of the page into a variable, then use that value wherever you need - If, Switch, in a selector, etc.

Hi,

To isolate cause, can you try the following minimal selector, then validate it in SelectorEditor with Highlight option?

<wnd app='exceed.exe' title='.*(Repo|Borrow Lending).*' matching:title='regex' />

image

If it works and highlights expected window, we need to find cause in other attribute or element.

Regards,