1 | ## node-geckodriver [![Build Status: Linux](https://travis-ci.org/vladikoff/node-geckodriver.svg?branch=master)](https://travis-ci.org/vladikoff/node-geckodriver) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/s1e19ujtssxcn268/branch/master?svg=true)](https://ci.appveyor.com/project/vladikoff/node-geckodriver/branch/master) [![npm package](https://img.shields.io/npm/v/geckodriver.svg)](https://www.npmjs.com/package/geckodriver)
|
2 |
|
3 | > Downloader for [github.com/mozilla/geckodriver/releases](https://github.com/mozilla/geckodriver/releases)
|
4 |
|
5 | This puts `geckodriver` or `geckodriver.exe` into root of this module.
|
6 |
|
7 | ## Install
|
8 |
|
9 | ```
|
10 | npm install geckodriver
|
11 | ```
|
12 |
|
13 | ## Usage
|
14 |
|
15 | There are several ways to use this module:
|
16 |
|
17 | ### Use the provided `geckodriver` from `bin` directory.
|
18 |
|
19 | ```
|
20 | bin/geckodriver [args]
|
21 | ```
|
22 |
|
23 | ### Use it by requiring:
|
24 |
|
25 | ```
|
26 | require('geckodriver');
|
27 | ```
|
28 |
|
29 | ### Use it by setting WebDriver capabilities:
|
30 |
|
31 | ```
|
32 | profile.setPreference('marionette', true);
|
33 | // Add log level if needed:
|
34 | // profile.setPreference('marionette.logging', 'TRACE');
|
35 | ```
|
36 |
|
37 | ### Use it globally:
|
38 |
|
39 | ```
|
40 | npm install -g geckodriver
|
41 | geckodriver [args]
|
42 | ```
|
43 |
|
44 | Note: This installs a `geckodriver` shell script that runs the executable, but on Windows, selenium-webdriver looks for `geckodriver.exe`. To use a global installation of this package with selenium-webdriver on Windows, copy or link `geckodriver.exe` to a location on your PATH (such as the NPM bin directory) after installing this package:
|
45 |
|
46 | ```
|
47 | mklink %USERPROFILE%\AppData\Roaming\npm\geckodriver.exe %USERPROFILE%\AppData\Roaming\npm\node_modules\geckodriver\geckodriver.exe
|
48 | ```
|
49 |
|
50 | ## Setting a CDN URL for binary download
|
51 |
|
52 | To set an alternate CDN location for geckodriver binaries, set the `GECKODRIVER_CDNURL` like this:
|
53 |
|
54 | ```
|
55 | GECKODRIVER_CDNURL=https://INTERNAL_CDN/geckodriver/download
|
56 | ```
|
57 |
|
58 | Binaries on your CDN should be located in a subdirectory of the above base URL. For example, `/vxx.xx.xx/*.tar.gz` should be located under `/geckodriver/download` above.
|
59 |
|
60 | Alternatively, you can add the same property to your `.npmrc` file.
|
61 |
|
62 | Default location is set to https://github.com/mozilla/geckodriver/releases/download
|
63 |
|
64 | ## Setting a PROXY URL
|
65 |
|
66 | Use `HTTPS_PROXY` or `HTTP_PROXY` to set your proxy url.
|
67 |
|
68 | ## Setting a specific version
|
69 |
|
70 | Use `GECKODRIVER_VERSION` if you require a specific version of gecko driver for your browser version.
|
71 |
|
72 | ## Using a cached download
|
73 |
|
74 | Use `GECKODRIVER_FILEPATH` to point to a pre-downloaded geckodriver archive that should be extracted during installation.
|
75 |
|
76 | ## Skipping geckodriver download
|
77 |
|
78 | Use `GECKODRIVER_SKIP_DOWNLOAD` to skip the download of the geckodriver file.
|
79 |
|
80 |
|
81 | ## Related Projects
|
82 |
|
83 | * [node-chromedriver](https://github.com/giggio/node-chromedriver)
|
84 |
|
85 | ## Versions
|
86 |
|
87 | * [npm module version] - [geckodriver version]
|
88 | * 1.22.x - geckodriver 0.29.0
|
89 | * 1.21.x - geckodriver 0.28.0
|
90 | * 1.20.x - geckodriver 0.27.0
|
91 | * 1.19.x - geckodriver 0.26.0
|
92 | * 1.18.x - geckodriver 0.26.0
|
93 | * 1.17.x - geckodriver 0.25.0
|
94 | * 1.16.x - geckodriver 0.24.0 and `GECKODRIVER_VERSION` env support
|
95 | * 1.15.x - geckodriver 0.24.0
|
96 | * 1.14.x - geckodriver 0.23.0
|
97 | * 1.13.x - geckodriver 0.22.0
|
98 | * 1.12.x - geckodriver 0.21.0
|
99 | * 1.11.x - geckodriver 0.20.0
|
100 | * 1.10.x - geckodriver 0.19.1
|
101 | * 1.9.x - geckodriver 0.19.0
|
102 | * 1.8.x - geckodriver 0.18.0
|
103 | * 1.7.x - geckodriver 0.17.0
|
104 | * 1.6.x - geckodriver 0.16.1
|
105 | * 1.5.x - geckodriver 0.15.0
|
106 | * 1.4.x - geckodriver 0.14.0
|
107 | * 1.3.x - geckodriver 0.13.0
|
108 | * 1.2.x - geckodriver 0.11.1
|
109 | * 1.1.x - geckodriver 0.10
|
110 |
|
111 | ## Changelog
|
112 |
|
113 | * 1.20.0 - geckodriver 27. Requires node 8 and higher. Support `HTTPS_PROXY` env and npm_config_geckodriver_version variables.
|
114 | * 1.19.0 - geckodriver 26. Dependency updates.
|
115 | * 1.18.0 - geckodriver 26.
|
116 | * 1.17.0 - geckodriver 25.
|
117 | * 1.16.2 - fix issue with 'tar' dependency.
|
118 | * 1.16.1 - added support for `GECKODRIVER_FILEPATH` env variable.
|
119 | * 1.16.0 - added support for `GECKODRIVER_VERSION` env variable. Set it to `'0.24.0'` to fetch that version.
|
120 | * 1.15.1 - fix for the new `.npmignore` pattern matching
|
121 | * 1.15.0 - geckodriver 0.24.0
|
122 | * 1.14.0 - geckodriver 0.23.0
|
123 | * 1.13.0 - geckodriver 0.22.0
|
124 | * 1.12.2 - add proxy settings
|
125 | * 1.12.1 - adm-zip security fix
|
126 | * 1.12.0 - geckodriver 0.21.0
|
127 | * 1.11.0 - geckodriver 0.20.0
|
128 | * 1.10.0 - geckodriver 0.19.1, switch tar package, enable Win32 builds again, process.env.npm_config_geckodriver_cdnurl support
|
129 | * 1.9.0 - updated to geckodriver 0.19.0 32-bit windows support removed.
|
130 | * 1.8.1 - added geckodriver.exe bin for Windows
|
131 | * 1.8.0 - updated to geckodriver 0.18.0
|
132 | * 1.7.1 - 'GECKODRIVER_CDNURL' support added.
|
133 | * 1.7.0 - updated to geckodriver 0.17.0 32-bit linux support added.
|
134 | * 1.6.1 - updated to geckodriver 0.16.1
|
135 | * 1.6.0 - updated to geckodriver 0.16.0. 32-bit linux support removed.
|
136 | * 1.5.0 - updated to geckodriver 0.15.0.
|
137 | * 1.4.0 - updated to geckodriver 0.14.0.
|
138 | * 1.3.0 - updated to geckodriver 0.13.0.
|
139 | * 1.2.1 - added support for Linux 32-bit.
|
140 | * 1.2.0 - updated to geckodriver 0.11.1.
|
141 | * 1.1.3 - adds Windows support, fixes Windows tests.
|
142 | * 1.1.2 - fixed `require` by pointing `package.json main` property to the `lib` file.
|
143 | * 1.1.0 - programmatic usage, added `bin` support.
|
144 | * 1.0.0 - init release
|