Using Selenium WebDriver

Let's start by adding the Selenium WebDriver JavaScript package to our project:

$ yarn add selenium-webdriver --dev

We will use selenium-webdriver to define our Step Definitions.

Selenium requires a browser to run tests on. This may be a real browser like Chrome, or a headless browser such a PhantomJS. You're likely familiar with the different real browsers, so let's spend some time taking a look at the headless browsers.

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.