1 |
|
2 |
|
3 |
|
4 | - [Command line interface](#command-line-interface)
|
5 |
|
6 |
|
7 |
|
8 | # Command line interface
|
9 |
|
10 | ```shell
|
11 | # simple, use defaults and latest selenium
|
12 | selenium-standalone install
|
13 | selenium-standalone start
|
14 |
|
15 | # install defaults, but silently
|
16 | selenium-standalone install --silent
|
17 |
|
18 | # specify selenium args, everything after -- is for selenium
|
19 | selenium-standalone start -- -debug
|
20 |
|
21 | # choose selenium version
|
22 | selenium-standalone install --version=3.141.59 --baseURL=https://selenium-release.storage.googleapis.com
|
23 |
|
24 | # choose chrome driver version
|
25 | selenium-standalone install --drivers.chrome.version=87.0.4280.20 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
|
26 |
|
27 | # choose ie driver architecture
|
28 | selenium-standalone start --drivers.ie.arch=ia32 --drivers.ie.baseURL=https://selenium-release.storage.googleapis.com
|
29 |
|
30 | # install a single driver within the default list (chrome, ie, edge, firefox, chromiumedge)
|
31 | selenium-standalone install --singleDriverInstall=chrome
|
32 |
|
33 | # specify hub and nodes to setup your own selenium grid
|
34 | selenium-standalone start -- -role hub
|
35 | selenium-standalone start -- -role node -hub http://localhost:4444/grid/register
|
36 | selenium-standalone start -- -role node -hub http://localhost:4444/grid/register -port 5556
|
37 |
|
38 | # If you have a complex configuration with numerous options or if you want to keep a clear configuration changes history,
|
39 | # you can specify the options in a configuration file :
|
40 | selenium-standalone install --config=/path/to/config.json
|
41 | selenium-standalone start --config=./config/seleniumConfig.js
|
42 |
|
43 | ```
|
44 |
|
45 | Config file can be a JSON file or a [module file](https://nodejs.org/api/modules.html#modules_file_modules) that exports options as an object:
|
46 |
|
47 | ```js
|
48 | module.exports = {
|
49 | drivers: {
|
50 | chrome: {
|
51 | version: '87.0.4280.20',
|
52 | arch: process.arch,
|
53 | baseURL: 'https://chromedriver.storage.googleapis.com'
|
54 | },
|
55 | },
|
56 | }
|
57 | ```
|