I also have an Excel file with a Menu column containing the values:
Login
Dashboard
Workflow in Main.xaml:
Use Read Range to read data from Excel and store it in dt_Excel.
Use For Each Row to loop through each row and store the value CurrentRow["Menu"].ToString() in the vMenu variable.
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?
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:
Create a Out direction argument of UiElement variable type in Login workflow and assign it to output element property field of use application activity.
Create a In direction argument of UiElement variable type in dashboard workflow and assign it to input element property field of use application activity.
Create a intermediate variable of UiElement variable type in main flow to pass the data between two flows.
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.