WebDriver is a general purpose library for automating web browsers, part of the Selenium project. It is now a W3C specification which standardises browser automation, providing a reliable and consistent protocol to remotely control web browsers via a restful HTTP API.

Created more than a decade ago, Selenium is by far the most widely used project in the automated testing industry, providing a comprehensive set of tools for browser automation, initially written for Java but now with support for most programming languages.

Internally, Nightwatch uses the W3C WebDriver API to perform the browser automation related tasks, such as opening windows or clicking links.

Support for Selenium Grid and Cloud Providers

Nightwatch can also be used for distributed cross-browser end-to-end testing at scale together with the Selenium Server (also known as Selenium Grid), which is an open-source project written in Java that manages a network of WebDriver nodes.

Nightwatch also can be integrated with cloud-based testing platforms like Browserstack, SauceLabs, CrossBrowserTesting, or LambdaTest.

Selenium Server Operation

Supported browsers

WebDriver is implemented by all major browser vendors as a W3C compliant HTTP service.

Browser Driver Browser Description
GeckoDriver Mozilla Firefox Standalone application which implements the W3C WebDriver API to communicate with Firefox.
ChromeDriver Google Chrome Standalone application which implements the W3C WebDriver API for Chromium.

Available for Chrome on Android and Chrome on Desktop (Mac, Linux, Windows and ChromeOS).
Microsoft Edge Driver Microsoft Edge Standalone application which is used to drive the recent Edge browser, based on Chromium, which works similar to ChromeDriver.
SafariDriver Microsoft Edge The /usr/bin/safaridriver binary comes pre-installed with recent versions of Mac OS and it's available to use following the instructions on Apple Developer website.

More information is available on About WebDriver for Safari page.
Improve this article