Query about use app/browser

Hi,

I have a query, let’s say i have a Bot A , Bot B & Login Bot.

  1. First am login to the portal, login successful
  2. calling the Bot A. I have to perform some actions, so i have to use the use application/browser activity then put all the recorder action on it. hope it should not open the page again, does it matter if the window title is change,
  3. after performing certain action in Bot A, if it successful again i need to call Bot B, there are recorders option are there, so do i need to use the Use Application/Browser again to perform the recorders action or how ? Kindly guide.

@yedukondaluaregala

@balkishan

As you mentioned there two bots then you need to use use application browser acitvity in Bot B as well. with out this parent activity if you add any child activity it will throw the error. for your experience give a try what exactly your thinking and see how/what it throwing the error. this will give the experience in future automations.

Happy Automation.

Hi @balkishan,

If it is the same application, then in Bot A and Bot B you can use the Use Application/Browser activity with the Do not open option selected, so it attaches to the existing browser session instead of opening the application again. If you are concerned about dynamic window titles, you can pass the browser/application variable as an argument from the Login Bot to Bot A, and then from Bot A to Bot B. This helps maintain the same browser instance and avoids issues caused by title changes.

Thanks

Hi,

sorry i did not get the passing window variable as an arguments.

in login the bot has login to the portal. now title changed.

Bot A, expecting Dashboard Window Title.
Bot B, is expecting Invoice Processing Title window

I wanted to know, in Use App/Browser, is there any option to fix the window,

Also i have noticed, i don’t see any activity to check If Window exist, or activate window, max/minimize window.

@balkishan

If it is just window title change and those both are constant then you can regex selector, so that one use application browser will work for both titles.

regex selector syntax,

lets say you can find the difference when you indicated the window,
assume below attributes,
Bot A
titel = “DashBoard window”
Bot B
title = “Invoice processing window”

then use write below expression in selector,

title = ‘DashBoard window|Invoice processing window’ matching:titel = ‘regex’
this will work eaither any one of them is appeared

Hi @balkishan,

Yes, you can pass the current browser element between workflows. In the Use Application/Browser activity, use the Output element property, which outputs the target UI element and stores it in a UIElement object. This can then be reused in other workflows to attach to the same browser instance. You can create an Out argument in the Login Bot and pass it as an In argument to Bot A and Bot B.

If that approach does not work, then in the Login Bot keep the Open option set to Always so the browser launches initially. In Bot A and Bot B, indicate the same application/browser with the required titles and set the Open option to No/Do not open. This way, UiPath will attach to the existing browser session instead of opening a new instance.

Thanks

this is a real time scenario, but in modern UiPath use app/browser activity make it little confused, when we deal with the diff window at the same time and same browser.

we need to open and close the window, let say Dashboard Window is open, when bot click then another new window will open in the same browser, which bot b should work, once finish the work close the window, again start from bot a like this…

hi thanks for the response, but am avoiding using regex,

this is common scenario..it is not new, due to the modern activity, it is lil confusing…

@balkishan

can you share your workflow snaps here with some test activities it will help

@balkishan

Firs thing how are you calling second bot from first? or do you mean workflows?

to attahc to different windows you need to use different use app/browsers

cheers

cheers

Hi @balkishan,

If you are using Application A for login, and it opens Application B and C, while you have separate bots for B and C, then before calling those bots you can use the Activate activity (Activities - Activate) to bring the required window into focus. This helps the bot attach to the correct application window before execution.

If it is the same application but different screens are opening in separate windows, then instead of creating completely separate bots, it may be better to design them as separate modules/workflows for those specific screens or requirements. That approach is usually easier to maintain and reuse in UiPath projects. It would also help if you could share a snapshot of the current workflow structure for clarity.

Thanks

Hi @balkishan
Try Below steps:

  1. Login Bot
  • Open browser + login
  1. Bot A
  • Use Use Application/Browser
  • Indicate same browser (don’t open new)
  1. Bot B
  • Again use Use Application/Browser
  • Attach to same browser

Use Attach (Indicate Application)
Use wildcards (*) if title changes

No need to open browser again

Hi @balkishan

This is actually a common real-time scenario in modern UiPath automation.

My suggestion would be:

  • Keep the Login workflow responsible only for opening browser and login
  • For Bot A and Bot B, use separate Use Application/Browser activities to attach to the required window/tab
  • Set the browser option to:
    • Do Not Open / Reuse Application

In modern design, Use Application/Browser is mainly used for attach, scope management and application handling

So even if it is the same browser, using separate Use Application/Browser for different windows/screens is the recommended and cleaner approach.

You can also:

  • use wildcards (*) in titles if window titles change dynamically
  • use Activate App/Browser before actions if multiple windows are open
  • pass the UiElement/browser variable between workflows if you want to maintain the same browser instance across workflows

UiPath recommends using Use Application/Browser as the parent container for UI activities in modern experience:
Studio - Differences Between Modern Experience and Classic Experience