How to execute Chrome/Edge/Firefox automation in PiP without interrupting your work in the main session

When executing web automation with Chrome/Edge/Firefox browsers in the child session of a PictureInPicture (PiP) mode and you want to continue using the browser in the main session, please know that both Chrome and Edge cannot be launched simultaneously, in different sessions, while using the same user data directory.

Here is some background information about this situation:

The default folder is created by the browser, at its first launch. For example, for Chrome on Windows, the default folder location is

%LOCALAPPDATA%\Google\Chrome\User Data

Your browser profiles data is kept here and every new browser profile you create has its own space: navigation history, bookmarks, and cookies.

If, as a user, for any particular reason, you choose to start the browser with your own custom data folder, you can do that by launching the browser with the following command:

chrome.exe --user-data-dir=c:\foo`

All your profiles data will be kept under that custom folder.

To bypass this limitation, the Modern UseApplicationBrowser and the Classic OpenBrowser activities provide an out-of-the-box solution: the UserDataFolderMode and UserDataFolderPath properties which instruct the activity on launching the browser with either its default folder, the one automatically generated by the activity, or a custom one, specified by the latter property.

Let’s take a closer look at how these properties work.

Case #1:

You don’t want to know all the details about the user data folder, you simply want the automation to launch the browser in PiP and do its job, allowing you to do your own job in the main session. Then, just leave the UserDataFolderMode empty . Its default value will be inherited as ‘Automatic’ from the Project Settings/ApplicationBrowser section: the robot will automatically create for you a temporary data folder/profile to run the automation in PiP.

Case #2:

You want to execute the automation in PiP with the default user data folder since it contains your default profile and all your business apps login history and cookies. Set UserDataFolderMode to DefaultFolder . Please keep in mind that simply launching the browser in your working session will not be possible until the PiP automation finishes and/or the PiP browser stops.

Case #3:

You know what you’re doing and you understand both the browser limitation and the UiPath provided capabilities. Set UserDataFolderMode to CustomFolder and set UserDataFolderPath to a path of your choice.

For all of the above cases, I recommend installing the extension per group policy. This way, the extension will be available and activated for any browser profiles, regardless if they are created in default or custom user data folders.

Happy automation!