1 | [![Build Status](https://travis-ci.org/unscrambl/browser-driver-installer.svg?branch=master)](https://travis-ci.org/unscrambl/browser-driver-installer)
|
2 |
|
3 | # browser-driver-installer
|
4 | Installs the Chrome and Gecko drivers that match with the specified browser versions.
|
5 |
|
6 | #### Usage:
|
7 |
|
8 | **Post Install Script:** If your environment has the `BROWSER_DRIVER_INSTALLER_CHROME_VERSION`, `BROWSER_DRIVER_INSTALLER_CHROMEDRIVER_PATH`, `BROWSER_DRIVER_INSTALLER_FIREFOX_VERSION`, `BROWSER_DRIVER_INSTALLER_GECKODRIVER_PATH` variables defined, a post-install script will download the `ChromeDriver` and `GeckoDriver` executables to the specified paths automatically.
|
9 |
|
10 | If you want to, you can call the post-install script *without* the installation with `npx`:
|
11 | ```
|
12 | npx --package browser-driver-installer installBrowserDrivers
|
13 | ```
|
14 |
|
15 | **As a module:**
|
16 | ```
|
17 | const browserDriverInstaller = require('browser-driver-installer').browserDriverInstaller;
|
18 | browserDriverInstaller(BROWSER_NAME, BROWSER_VERSION, TARGET_PATH);
|
19 | ```
|
20 |
|
21 |
|
22 | **CLI Usage:**
|
23 |
|
24 | ````
|
25 | Usage: index [options]
|
26 |
|
27 | Options:
|
28 |
|
29 | --browser-name <browserName> Sets the name of the browser to install the driver for
|
30 | --browser-version <browserVersion> Sets the browser version string, e.g., 65, 67.0.23
|
31 | --target-path <targetPath> Sets the target path to install the driver executable
|
32 | -h, --help Prints out this help information
|
33 | ````
|
34 |
|
35 | ## LICENSE
|
36 | [Apache 2.0](https://github.com/unscrambl/browser-driver-installer/blob/master/LICENSE)
|
37 |
|
\ | No newline at end of file |