Site icon TestingDocs.com

Selenium Server Error: No drivers have been configured

Overview

In this post, we will fix the Selenium Server Error: No drivers have been configured or have been found on PATH. In this example, we will use Ubuntu Linux machine.

Ubuntu Linux

Selenium Server Error

Error indication is that selenium grid fails to start with the following error trace.

[NodeOptions.addDetectedDrivers] – No drivers have been configured or have been found on PATH
java.lang.reflect.InvocationTargetException

standalone option

The ‘standalone option the server tries to run all the grid components in process. For example, grid components like Event-bus, Session map, Session queue, Distributor, Router and Node. As the error trace suggests , When adding a node the server did not find any drivers in the System PATH.

To know more on Selenium Grid 4 Distributed Mode:

https://www.testingdocs.com/selenium-grid-distributed-mode/

Error Fix

Download browser drivers like Google Chrome Driver, GeckoDriver executable to a directory.Steps to download various browser drivers:

Chrome Driver

https://www.testingdocs.com/download-google-chromedriver-on-ubuntu/

Gecko Driver

https://www.testingdocs.com/download-mozilla-geckodriver-on-ubuntu-linux/

Add the directory to the System PATH. For example, if the directory is under home directory in ‘drivers’ directory.  Edit /etc/profile file.

$ sudo gedit /etc/profile

Append the PATH system variable with the drivers directory.

PATH=$PATH:$HOME/drivers

export PATH

Verification

Open Terminal and Issue the following command.

$ echo $PATH

Cross check that the driver folder has been added to the PATH.

Start the Selenium server.

The error should be fixed now. That’s it.

Windows 11

Steps to edit PATH system variable on Windows 11:

https://www.testingdocs.com/questions/how-to-edit-path-variable-on-windows-11/

Selenium Tutorials on this website:

https://www.testingdocs.com/selenium-webdriver-tutorial/

Official Website:

https://www.selenium.dev/

Exit mobile version