DEV Community

Amanda Cavallaro
Amanda Cavallaro

Posted on

Selenium webdriver, chromeDriver and Ruby on Windows

Automating tasks you have to do over and over can be very helpful. I have been doing that on MacOS but I had the need to do it Windows and the online tutorials were not very helpful.

Illustration of a non-helpful tutorial statement

Selenium is an open-source tool used to automate browsers. Their official website contains tutorials and code snippets in various programming languages: java, csharp, python ruby, php, perl and javascript.

Below you can find a script for MacOS and Windows on how to install Selenium-web driver, Chrome Driver and Ruby. Please note I chose a specific version for each, but feel free to pick the one that makes more sense to you.

MacOS Tutorial on how to install what is listed on the title of this article.

#!/usr/bin/env bash
#!/usr/bin/env ruby
xcode-select — install
/usr/bin/ruby -e “$(curl -fsSL"
curl > /tmp/
unzip /tmp/ -d /tmp
sudo gem install selenium-webdriver

This link is very helpful in order to put ChromeDriver location in your PATH environment variable:

Windows Tutorial

  1. Download
  2. Install Ruby version e.g — 2.2.6
  3. In order to put ChromeDriver location in your PATH environment variable do as follows:

Right click computer > properties > system properties >

Advanced > System properties > Select Path below >

Edit >Add the path

(if you are unsure of the path, you can right click the icon of the file and in the properties get the full path).

This video is very helpful to see this step-by-step however it is of an older windows versions, so you have to adapt to the one you’re currently using.


My favourite selenium resources when studying selenium with Ruby.

  1. A free, once-weekly e-mail on how to use Selenium like a Pro: Elemental Selenium: Receive a Free, Weekly Tip on Using Selenium like a Pro
  2. Cheatsheet:

Top comments (0)