Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YourFriendCaspian/4b39c28fbddf5ffe9b2b9a44a5e0a486 to your computer and use it in GitHub Desktop.
Save YourFriendCaspian/4b39c28fbddf5ffe9b2b9a44a5e0a486 to your computer and use it in GitHub Desktop.
Instructions for installing the most popular webdrivers, and then the latest version of the standalone Selenium server

Steps For Setting Up Selenium And The Webdrivers

Install The Firefox Geckodriver

  • Download the latest Geckodriver for Firefox
  • then mv that file to /usr/local/bin/geckodriver and sudo chmod +x /usr/local/bin/geckodriver
  • make sure you have "webdriver.firefox.profile" : "geckodriver", in your nightwatch.json file if you are using it

Install The Chromedriver

  • Download the latest version from the Chrome site
  • unzip it if it is a zip file
  • then mv that file to /usr/local/bin/chromedriver and sudo chmod +x /usr/local/bin/chromedriver

Install the Safari Driver

  • Download the SafariDriver.safariextz from the release site
  • Double click on the file and it will open in Safari
  • Accept the file as trusted
  • It will now show in your extensions

Build the latest Selenium binary

  • git clone git@github.com:SeleniumHQ/selenium.git
  • cd selenium
  • ./go clean release
  • cd build/dist
  • You can now run the server with the following: java -jar selenium-server-standalone-3.0.0-beta1.jar
  • you may have a server of a different name depending on when you read this tutorial

Running the server

  • cd to the directory where you build the jar file
  • run: java -jar selenium-server-standalone-3.0.0-beta1.jar

You can also alias the function in a ~/.bashrc or ~/.zshrc with:

alias selenium="java -jar /path/to/build/dist/folder/selenium-server-standalone-3.0.0-beta1.jar"

Remember: You may have a server of a different name depending on when you read this tutorial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment