**Issue with Workflow in UiPath: Browser Opens Twice**

I have three workflows in UiPath:

  1. Main.xaml
  2. Login.xaml
  3. Dashboard.xaml

I also have an Excel file with a Menu column containing the values:

  • Login
  • Dashboard

Workflow in Main.xaml:

  1. Use Read Range to read data from Excel and store it in dt_Excel.
  2. Use For Each Row to loop through each row and store the value CurrentRow["Menu"].ToString() in the vMenu variable.
  3. Use a Switch Case based on vMenu:
  • If Login, navigate to Login.xaml.
  • If Dashboard, navigate to Dashboard.xaml.

Issue I am facing:
After completing the login process and navigating to the dashboard screen, UiPath opens a new browser window. I want the process to continue using the same browser instance instead of opening a new one.

My question:
How can I make UiPath use the same browser session after login and prevent it from opening a new browser when navigating to Dashboard.xaml?

Assumption: Ui Interaction is modelled with modern design:

check the Use Browser Settings:

2 Likes

@Vhierdy_Hafidz

Can you send properties screenshot what you selected for use application/Browser activity

1 Like

Hi @Vhierdy_Hafidz , I believe you must be using modern activities. If you want to continue the same browser instance without having to create new instances please follow below steps:

  1. Create a Out direction argument of UiElement variable type in Login workflow and assign it to output element property field of use application activity.
  2. Create a In direction argument of UiElement variable type in dashboard workflow and assign it to input element property field of use application activity.
  3. Create a intermediate variable of UiElement variable type in main flow to pass the data between two flows.

Please refer to the screenshot attached.

Hope this helps! Happy automation!

1 Like

Hi @Vhierdy_Hafidz

Use an argument to pass the browser instance from Login.xaml to Dashboard.xaml. In Login.xaml, store the browser in a variable and pass it as an argument. In Dashboard.xaml, use Attach Browser instead of Open Browser to continue in the same session.

1 Like

Thanks for the reponse @ppr @Karthik23 @yedukondaluaregala @prashant1603765 .
Right now im following @ppr and it solve my problem. but ill try @Karthik23 suggestion, continue the same browser instance without having to create new instances :pray:

1 Like

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