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 specific driver.

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

Get the Selenium Standalone Server

curl -O

Version 3.x of Selenium doesn’t include driver for Firefox any more. 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.0.1.jar

Get the GeckoDriver

For Linux:

curl -O
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

For macOS:

curl -O

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


Tested versions

Selenium Standalone ServerFirefoxGeckoDriverChromeChromeDriver

Alternative - it’s a Nightmare

Nightmare is 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!