Starting Chrome with a different Chrome profile

In Chrome, you can have different profiles, with their own settings, bookmarks etc.
In some cases, it would be nice to run UiPath from its own profile. Example: I need to automate a legacy website, where browser cache sometimes causes issues (no kidding: the home page says “Please clear your browser cache before signing onto this website”). So, it would be nice to use a specific profile “uipath” that uses no cache at all.
Once I define this new “uipath” profile, to run Chrome with it I know these ways:

  1. On the command line

    chrome --profile-directory=“UiPath”

  2. Once Chrome is running, click on the profile symbol (just left of the 3 vertical dots that open Chrome menu), a menu will open, the additional profiles will be visible there, click on the desired one

The former seems easier.
Is there a way to tell UiPath to use a special command line argument when running Chrome?
Of course, other ways to achieve the same result would be great.

1 Like

Hi @borreo

1.Have you add a Chrome extension in UiPath Studio

2.the same need to be done in Google Chrome

Thanks
Ashwin S

Yes, I have installed the extension both on my normal profile and on the new UiPath profile.

Hi @borreo

Are you able to test it

Thanks
Ashwin S

Yes, the UiPath extension works, I am able to automate Chrome with UiPath.
I just want UiPath to launch Chrome with a different profile, rather than the default one.

Hi @borreo
Can you elaborate ur scenario

Thanks
Ashwin S

How do I get UiPath to open Chrome in private mode?
And how can this help me in getting UiPath to run Chrome with a different profile?

I see.
I have given permission to the UiPath extension to run in private/incognito mode, and I can automate the website, so Chrome will not store any new history.
But the private mode does not prevent the browser from using the existing history.
If I use Chrome manually and navigate to the site, it will collect history/cache. Then I launch UiPath, that starts Chrome in private mode, and the cache will cause problems.
That’s why I would prefer to have a Chrome profile to be only used by UiPath.

Hi @borreo
Why dont use a send hot key for incognito mode by using send hot key as Ctrl+Shift+N

Thanks
Ashwin S

I can use incognito/private mode, but it does not prevent the browser from using the existing history.

Workaround that I tried: when opening the browser, I passed this URL:

in_URL+" --profile-directory=uipath"

This started a Chrome browser with the specified profile, the UiPath icon was visible and blue in the top right of the browser, but UiPath was not able to communicate with the extension.

Hey @borreo did you have any solutions in working with different chrome profiles? I am getting the same outcome as you. I am unable to communicate with a new chrome profile