-
Notifications
You must be signed in to change notification settings - Fork 116
feat(selenium-grid): run webdriver-manager as a selenium-grid node (merge against master branch) #386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(selenium-grid): run webdriver-manager as a selenium-grid node (merge against master branch) #386
Changes from 8 commits
29168a4
1dbbcc1
500bd1e
9811807
253f809
a9193a0
8c334a7
e2851da
690e5c4
4e2ca9d
51cbe83
db8c837
063bd56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,6 +85,11 @@ const standaloneNodeOption: yargs.Options = { | |
| describe: 'Start the selenium server standalone with role set to "node".', | ||
| type: 'boolean' | ||
| }; | ||
| const GRID_NODE = 'gridNode'; | ||
| const gridNodeOption: yargs.Options = { | ||
| describe: 'Start the selenium grid with role set to "node".', | ||
| type: 'string' | ||
| }; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would rebase. STANDALONE is now SELENIUM and SELENIUM_ALIAS Could we call this as SELENIUM_GRID_URL? And have one called SELENIUM_GRID_URL_ALIAS? I am trying to standardize this and add a README for this. I have a few flags to fix that I also need to fix. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok - done |
||
| const VERSIONS_CHROME = 'versions.chrome'; | ||
| const versionsChromeOption: yargs.Options = { | ||
| describe: 'The chromedriver version.', | ||
|
|
@@ -139,6 +144,7 @@ yargs | |
| .option(SELENIUM_PORT, seleniumPort) | ||
| .option(STANDALONE, standaloneOption) | ||
| .option(STANDALONE_NODE, standaloneNodeOption) | ||
| .option(GRID_NODE, gridNodeOption) | ||
|
||
| .option(VERSIONS_CHROME, versionsChromeOption) | ||
| .option(VERSIONS_GECKO, versionsGeckoOption) | ||
| .option(VERSIONS_IE, versionsIeOption) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,8 @@ export interface Server { | |
| version?: string; | ||
| // Run as role = node option. | ||
| runAsNode?: boolean; | ||
| // Run as grid node role = hub registration URL path. | ||
| gridNode?: string; | ||
|
||
| // The relative or full path to the chrome logs file. | ||
| chromeLogs?: string; | ||
| // The full path to the edge driver server. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,6 +42,7 @@ export function addOptionsBinary(options: Options): OptionsBinary { | |
| seleniumProviderConfig.port = optionsBinary.server.port; | ||
| seleniumProviderConfig.runAsDetach = optionsBinary.server.runAsDetach; | ||
| seleniumProviderConfig.runAsNode = optionsBinary.server.runAsNode; | ||
| seleniumProviderConfig.gridNode = optionsBinary.server.gridNode; | ||
| optionsBinary.server.binary = new SeleniumServer(seleniumProviderConfig); | ||
| } | ||
| return optionsBinary; | ||
|
|
@@ -112,10 +113,15 @@ export function convertArgs2Options(argv: yargs.Arguments): Options { | |
| if (argv.iedriver as boolean) { | ||
| options.browserDrivers.push({name: 'iedriver', version: versionsIe}); | ||
| } | ||
| if (argv.gridNode as string === '') { | ||
| console.log('Please specify a grid hub URL...'); | ||
| process.exit(); | ||
| } | ||
| if (argv.standalone as boolean) { | ||
| options.server = {}; | ||
| options.server.name = 'selenium'; | ||
| options.server.runAsNode = argv.standalone_node as boolean; | ||
| options.server.gridNode = argv.gridNode as string; | ||
|
||
| options.server.runAsDetach = argv.detach as boolean; | ||
| options.server.version = versionsStandalone; | ||
| options.server.chromeLogs = argv.chrome_logs as string; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.