Automated browser tests, in my case, are often part of continuous integration (CI). Failure = no deploy. This naturally creates some expectations towards acceptance/end to end testing framework. I haven’t found the tool which would meet all requirements although CodeceptJS is close. Nevertheless, no matter whether you use Protractor, Nightwatch.js, WebdriverIO, CodeceptJS or anything else based on Selenium you need to set it up and make it talk to the browser.

Selenium and drivers versions are important as not all drivers can run on any version of Selenium and not all browser versions are compatible with the specific driver.

All following commands should be executed from the root of your project.

Get the Selenium Standalone Server

curl -O https://selenium-release.storage.googleapis.com/3.4/selenium-server-standalone-3.4.0.jar

Version 3.x of Selenium doesn’t include a driver for Firefox anymore. To run your tests in Firefox 48+ you need GeckoDriver. Check the CHANGELOG for more info.

This particular version requires Java to run:

java -jar selenium-server-standalone-3.4.0.jar

Get the GeckoDriver

For Linux:

curl -O https://github.com/mozilla/geckodriver/releases/download/v0.10.0/geckodriver-v0.10.0-linux64.tar.gz
tar -xvf geckodriver-v0.10.0-linux64.tar.gz

You can find other GecoDriver releases on GitHub and download appropriate for your system.

Get the ChromeDriver

For Linux:

curl -O http://chromedriver.storage.googleapis.com/2.30/chromedriver_linux64.zip
unzip chromedriver_linux64.zip

For macOS:

curl -O https://chromedriver.storage.googleapis.com/2.31/chromedriver_mac64.zip
unzip chromedriver_mac64.zip

You can find other ChromeDriver releases on Chromium website and download appropriate for your system.

Versions

Tested versions

Selenium Standalone ServerFirefoxGeckoDriverChromeChromeDriver
3.0.0-beta248.00.10.051-532.23
3.0.0-beta4542.24
3.0.0542.25
3.0.155-562.27
3.3.1572.29
3.4.0592.30

Alternative - it’s a Nightmare

Nightmare is a very interesting alternative to Selenium-based testing frameworks. In contrast to those I’ve mentioned at the beginning, I don’t have much experience with it. Based on my tests it was almost 3 times faster on average than WebdriverIO. Under the hood Nightmare uses Electron.

To start using Nightmare all you need to do is install it and start writing tests. No config files required.

npm i -D nightmare

Check it out. Nightmare is definitely worth giving a try!