1 | #!/usr/bin/env node
|
2 |
|
3 | const program = require('commander');
|
4 | const browserDriverInstaller = require('./installer').browserDriverInstaller;
|
5 |
|
6 | if (require.main === module)
|
7 | {
|
8 | program
|
9 | .option('--browser-name <browser-name>', 'Sets the name of the browser to install the driver for')
|
10 | .option('--browser-version <browser-version>', 'Sets the browser version string, e.g., 65, 67.0.23')
|
11 | .option('--target-path <target-path>', 'Sets the target path to install the driver executable')
|
12 | .parse(process.argv);
|
13 |
|
14 | browserDriverInstaller(program.browserName, program.browserVersion, program.targetPath);
|
15 | }
|
16 | else
|
17 | {
|
18 | module.exports.browserDriverInstaller = browserDriverInstaller;
|
19 | }
|