Set the version of Google Chrome browser opened by UiPath

. 2 mins read

Set the version of Google Chrome browser opened by UiPath

As you might already know, Google Chrome has different release channels. All these channels offer different versions of Google Chrome. These release channel versions can coexist on our machine.

Google Chrome Release Versions

  • Chrome Stable Channel
  • Chrome Beta Channel
  • Chrome Dev Channel
  • Chrome Canary Channel

All of these versions can coexist on our machine.

The Problem

In UiPath, we have an activity to Open Browser. As of writing this article, the activity accepts BrowserType and Url as inputs and we don’t have an option to select the version of the browser installed.

Since UiPath releases Chrome extension for stable version of Chrome, it won’t work with other release versions.

When we install any release of Chrome, the installer modifies couple of keys in the registry which sets the latest installed version as the default version in the system.

The key is located at following paths in the registry

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe
  • HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe

For example, when you install Chrome Canary Channel version over the stable version, the values of these keys become.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe]
@="C:\\Users\\username\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe"
"Path"="C:\\Users\\username\\AppData\\Local\\Google\\Chrome SxS\\Application"

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe]
@="C:\\Users\\username\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe"
"Path"="C:\\Users\\username\\AppData\\Local\\Google\\Chrome SxS\\Application"

The Fix

To fix this issue, we have to modify the registry key with the path to the version you want.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe]
@="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"
"Path"="C:\\Program Files (x86)\\Google\\Chrome\\Application"

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe]
@="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"
"Path"="C:\\Program Files (x86)\\Google\\Chrome\\Application"

How to apply the fix?

Option 1

  • Download the .reg file.
  • Right click on the file.
  • Click Merge.
  • Click Yes in the registry editor window

Option 2

  • Open Registry Editor by running the command regedit from run window.
  • Navigate to the registry paths mentioned above. You can copy paste it in the top pane to directly access the key.
  • Right click on Path and enter the folder path where the desired version of chrome is present. e.g. C:\Program Files (x86)\Google\Chrome\Application
  • Right click on (Default) and enter the full file path to the chrome.exe file. e.g. C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

To test whether the change was successful, run the command chrome from run window. It should open the desired version of Chrome Browser. You might have to restart the machine for the changes to reflect.

Use the same approach to fix issues with other browsers, if you are using non stable versions.

  • Search for your browser name in the registry paths HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths and HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
  • Update values to match the version you are looking for.

RPA
Using Inject JS Script Activity in UiPath
02 Feb 2021

A comprehensive guide on how to use Inject JS Script Activity in UiPath.

RPA
How to deserialize JSON in UiPath?
27 Feb 2020

Tutorial on how to properly deserialize JSON with UiPath Web Activities. Explains the concept of JSON Array and JSON Object.

RPA
Dynamic or Variable Selectors in UiPath
28 May 2019

Tutorial on how to use dynamic selectors in UiPath. Explains how to use variables in UiPath selectors.