Attaching UI activities to browser opened by login library

Hello,

I’m automating a process where a shared login library opens a browser session. After the login library runs, I need to perform additional UI actions.

However, any UI activity I try to add afterward requires a Use Application/Browser scope, which opens a new browser instance and breaks the session.

How can I attach my activities to the browser session opened by the library without opening a second browser?

Thank you.

Hi @Daniel_Oisebe

You can create a browser element the first time you use application browser and then use that element in further use application activities. This would ensure same browser instance is referred everytime.

I am also using library for login, and sending browser element as out argument from library and then using it in rest of workflow.

@Daniel_Oisebe

in use application/browser properties you have a Open property..where you can select if not open or never so that new windows are not opened and it attaches to existing instance with matching name

cheers

Hi @Daniel_Oisebe

You can attach to the existing browser session without opening a new one by using Attach Browser.

  • After your login library runs, add an Attach Browser activity.
  • Indicate the browser window that was opened by the library.
  • Put all your subsequent UI activities inside this Attach Browser.

This way, UiPath uses the existing browser session instead of opening a new one.

Make sure the selector in Attach Browser reliably identifies the window (title, URL, etc.) so it always attaches to the correct session.