What is webdriver-manager?
The webdriver-manager npm package is a tool for managing WebDriver binaries. It is commonly used to download, update, and start WebDriver binaries for Selenium WebDriver, making it easier to set up and manage the necessary components for running automated browser tests.
What are webdriver-manager's main functionalities?
Download WebDriver binaries
This feature allows you to download the necessary WebDriver binaries for your browser. The `update` method fetches the latest versions of the binaries and stores them locally.
const webdriverManager = require('webdriver-manager');
webdriverManager.update();
Start WebDriver server
This feature starts the WebDriver server, which is necessary for running Selenium WebDriver tests. The `start` method launches the server and makes it ready to accept WebDriver commands.
const webdriverManager = require('webdriver-manager');
webdriverManager.start();
Stop WebDriver server
This feature stops the WebDriver server. The `shutdown` method gracefully stops the server, ensuring that all resources are properly released.
const webdriverManager = require('webdriver-manager');
webdriverManager.shutdown();
Other packages similar to webdriver-manager
selenium-standalone
The selenium-standalone package is similar to webdriver-manager in that it helps manage Selenium WebDriver binaries. It provides commands to install, start, and stop the Selenium server. Compared to webdriver-manager, selenium-standalone offers more flexibility in configuring the Selenium server and supports a wider range of browsers and versions.
chromedriver
The chromedriver package is specifically designed to manage the ChromeDriver binary. It allows you to download, update, and start the ChromeDriver server. While it is more limited in scope compared to webdriver-manager, it is a good choice if you only need to work with Chrome.
geckodriver
The geckodriver package is similar to chromedriver but is focused on managing the GeckoDriver binary for Firefox. It provides functionality to download, update, and start the GeckoDriver server. Like chromedriver, it is more specialized and limited in scope compared to webdriver-manager.
Webdriver Manager
Protactor's webdriver-manager
as a standalone Node.js module.
Warning: The official protractor webdriver-manager can be found here: https://github.com/angular/protractor/blob/master/bin/webdriver-manager
Changelog
[5.2.0] - 2015-05-19
- Added
WebdriverManager
constructor third argument: quiet
(default: false
). Supresses writing to both stdout
and stderr
.
[5.1.0] - 2015-05-18
- Added optional callback to
start(options, cb)
method. cb
will be executed once selenium server has started.
[5.0.0] - 2015-04-18
Changed
- Updated
chromedriver
version to 2.15
. (Nicolas PENNEC
)
[4.0.0] - 2015-04-14
Added
- Added
stop
method that attemps to shut down selenium nicely. - Added
options.closeOnStdinInput
parameter to the start
method to prevent closing standalone on key press.
Changed
start
method now receives an options
object.start
method options.closeOnStdinInput
is set to false
by default.