How to configure the selenium standalone server to use chrome driver

Selenium is a browser automation tool that is incredibly useful for testing, especially when you are practicing Behaviour Driven Development (BDD) using tool like behat.

The selenium server runs using the firefox (gecko driver) by default, sometimes you wish to use a different browser, making this switch is very simple and in this tutorial, we will use the chrome browser. Follow the steps listed below

  1. Downoad the selenium driver for the web browser of your choice, in this case (chrome driver).
  2. place the chromedriver file in the same folder with you selenium standalone server jar file.
  3. If on linux or mac, you need to make sure the file is executable, so run the command chmod 777 or chmod u+x chromedriver
  4. Run the selenium standard alone server with the chrome driver using the command below
# running the selenium server with chrome driver
java -jar selenium-server-standalone-3.11.0.jar -D"chromedriver.exe"



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s