Skip to main content

WebDriver Version Update

WebDriver Version Update

The purpose of this section is to provide information about the best practices for updating the web driver if the automatic driver updating process fails.

Each web driver corresponds to a particular browser version. The browser may receive the update automatically (but the web driver may not), resulting in a version mismatch error.

For example, automation processes using the Chrome browser may encounter the following exception:

SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 96

To fix the exception, you need to identify the node on which the automation process was running, since the web driver is a node environment component.

Manual driver update method

To update drivers manually, you need to download the appropriate driver version and replace it in the node's working directory. However, if there is a recently added file in the data storage, the driver will be updated when the feature or node is restarted.

How to Update the Driver Version

There are two possible ways to identify the node on which the automation process is running for the purpose:

  1. Navigate to the Event Log of failed run.
  2. Check the Node Logs.

How to check the Node Logs

The failed task in Control Server view 

  • The corresponding Node Logs are opened:

 Log of the corresponding node

  • Search for the working directory by the node name. All drivers, as well as automation process dependencies, are stored in the working directory.

(warning) This can be the default folder, such as %Temp%NODE NAMEor a custom folder specified on the Node Details tab.

Defining node working directory

Working directory path can also be found at the Node Details tab:

Node working directory

  • To identify the Node host, go to the Node Details tab and check its IP address.

Node IP address

  • Connect to the desired machine, open the Chrome browser and check the version through the Help→ About menu.

Chrome Browser version

  • To fix the exception, you should replace the corresponding web driver file stored on the node with the required version.

(warning) You can check the driver version by running the --version command from the node's working directory.

>chromedriver.exe --version
ChromeDriver 96.0.4664.45 (76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-heads/4664@{#947})

Obtaining right web driver version

For the web-driver to run smoothly, the following conditions must be met:

  • The major driver version must be equal to the major browser version. For example, the Chrome web-driver v. 96.0.4664.45 is suitable for the Chrome browser v. 96.0.4664.100.
  • The platform architecture must match: you cannot run Linux driver on Windows.

The latest drivers for each browser can be found on the respective pages. 

Links are relevant at the time of writing (January 2023).

Common issues and solutions

IssueSolution

"The process cannot access the file because it is being used by another process" when replacing a driver file.

<span style="color: rgb(6,125,23);">"--no-sandbox"</span>

parameter selenium server do not close child chromedriver.exe process.

The driver file can only be replaced if it is not currently being used. Check Windows Task Manager to find and stop running instances of the required web driver. You can also use the following command to kill all opened chromedriver.exe:

taskkill /im chromedriver.exe /f
"Cannot find firefox binary in PATH" when running the automation process in Firefox.Firefox.exe must be placed in the PATH for geckodriver to work correctly.