Multiple browser pages with same title at once

My issue: My robot is designed to open a new browser and execute it’s tasks but many times there is already a browser open for that same page. When this happens the robot stops. I have used Browser-attribute when opening the new browser but that is apparently not sufficient.
What should I do? I was recommended before to kill all browser processes but that is not possible since I will then also close browser windows that must be up for the user. Any ideas? I’ve tried everything I can think of an nothing has worked out.

1 Like


Just use try catch and in try just pass the selector of your browser with indicate on screen or using attach browser use that element in “ACTIVATE” activity. And in catch just use open browser activity with link.

If you do like this if that page is already open it will activate without opening new session and do the activities if not, it will open a new session with link provided in browser.

hope it helps. May it not best way to do it sorry about that!!!give a try…


1 Like


Thank you very much. It sound like you have a great solution there. I will try use that one. Thank you!

1 Like

Hi there @Henrik_Gustafson

Seems like you want a new browser window every-time your bot runs or executes a certain action/workflow xaml.

Why don’t you use ‘new session’ in properties close that browser session handle (UiPath.core.browser variable) if it is not needed anymore…

Hi @Raghavendraprasad
Thank you! You are right. I want to open a new window every time but I believe that I’ve done what you state and it doens’t work.
Under OpenBrowser I have “NewSession” checked and I have use UiBrowser to save the browser identity. In the attach activities I use this UiBrowser variable but still, if I already have a windows open with the same title it doesn’t work.

Hi @Henrik_Gustafson

if I understand correctly all your open windows/tabs have same window title but different content or is it different windows with same content?

Anyway, the Browser handle/variable doesn’t just work on the window title, it works on many other attributes like Tab index, window session etc… And I have faced similar scenario where I needed to close the ‘New browser’ window which had the same title as other currently opened browser windows and was successful in closing them.

Are you - every time you assign it to a variable clearing the Browser handle or assigning the variable to nothing? That might be the issue too if the previous data is retained in memory.

Get back if you still have issues :slight_smile:

Hi @Raghavendraprasad
Yes, often they do have the same window title. What you describe is exactly how I expected things to work which have made me very frustrated when it doesn’t in practice. Maybe I still do something incorrectly then. I don’t clear the variables but aren’t those always null when the robot/automation starts? I run in to this issue very early in my automations.


Can you share,

  1. Browser name
  2. Your xamls?
  3. Workflow full - (if it is not confidential)

And the error and its frequency or is it appearing always?