Attended - More than one selector match

Hello,

We are working on attended POC and user is expected to be on the certain page before automation continues

I’m trying to confirm that only single Chrome tab/window will match the selector

when doing unattended, it would be easy just to close everything and only open page I need, for unattended I would like to return a message that says “more than one chrome window open of ” or similar

How do I make sure there’s only a single match to activity before proceeding?

1 Like

I think you could find the amount of matching Chrome tabs with Find Children (scope = Top_Levels).

First make sure the browser instance whichever was opened before bot getting triggered is closed

Then once bot starts and opens the browser, If you can get the number of tabs opened then you can decide accordingly

There are many ways to get the number of tabs opened
Have a view on this thread for more discussion on that

Hope this helps

Cheers @Zoran1983

it’s for an attended automation, I don’t want to display all this in front of user

I would just like to make sure I’m getting single match for the selector

I knew there was a better way, but it took a call to UiPath support

so no need for javascript, developer mode, get attributes etc

so lets say we want to make sure google is not open in 2 tabs

use activity element exists
highlight anything on google page, than change selector to

<html app='chrome.exe' title='Google' idx='2'/>

only way that idx=‘2’ will be true is if there’s another google tab/window open

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.