10-Minute Guide to Set up Test Automation using Selenium WebDriver with Ruby

Set up your computer to run Selenium WebDriver tests in Chrome

Zhimin Zhan
5 min readAug 9, 2021


In my one-day Selenium training, I suggest the attendants using the TestWise Ruby edition which bundles a Ruby (Windows) distribution. I want the attendants (most of them are new to test automation) to run/write a Selenium test as quickly as possible, in minutes. However, I emphasize that it is important to set up an automated test execution environment where you can run tests from the command line.

In this article, I will show you how to set up your machine to run raw Selenium WebDriver (Ruby) tests quickly, with 100% free open-source software.

Table of Contents1. Install Ruby (~2 mins)
2. Install Essential Gems (~1 to 6 mins)
3. Install Testing Gems (~1 min)
4. Install ChromeDriver (~ 1 minute)
5. Verify Test Execution
Next Steps

1. Install Ruby (~2 mins)

Ruby is a popular scripting language and pre-installed in macOS and some Linux distributions. In my opinion, Ruby is the best scripting language for test automation. Here I will cover Ruby installation for Windows, which requires more effort than that for Mac/Linux.

Info: GitHub, AirBNB and many other well-known web sites are written in Ruby.

Download RubyInstaller for Windows with Devkit, such as ‘Ruby+Devkit 2.6.8–1 (x64)’, and run the installer.

Important! Make sure the DevKit is selected (see the screenshots below) in the installation process. The DevKit is required for compiling certain libraries (called Gem in Ruby). You can also find a tutorial video (45s) here.

Make sure “MSYS2 development toolchain” is selected
Make sure the “Run ‘ridk install’” checkbox is selected.



Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.