feat(selenium-grid): run webdriver-manager as a selenium-grid node (merge against master branch)#386
feat(selenium-grid): run webdriver-manager as a selenium-grid node (merge against master branch)#386filipzamorsky wants to merge 13 commits intoangular:masterfrom
Conversation
cnishina
left a comment
There was a problem hiding this comment.
Looks good so far. I would rebase. There's a few changes that I made
| const gridNodeOption: yargs.Options = { | ||
| describe: 'Start the selenium grid with role set to "node".', | ||
| type: 'string' | ||
| }; |
There was a problem hiding this comment.
I would rebase. STANDALONE is now SELENIUM and SELENIUM_ALIAS
Could we call this as SELENIUM_GRID_URL?
We should use underscores. So the string would be 'selenium_grid_url'
And have one called SELENIUM_GRID_URL_ALIAS?
And this string would be 'standalone_grid_url'
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.
lib/cli/index.ts
Outdated
| .option(SELENIUM_PORT, seleniumPort) | ||
| .option(STANDALONE, standaloneOption) | ||
| .option(STANDALONE_NODE, standaloneNodeOption) | ||
| .option(GRID_NODE, gridNodeOption) |
There was a problem hiding this comment.
We will add this with .option and .alias. https://github.com/angular/webdriver-manager/blob/master/lib/cli/index.ts#L178
lib/cmds/options.ts
Outdated
| // Run as role = node option. | ||
| runAsNode?: boolean; | ||
| // Run as grid node role = hub registration URL path. | ||
| gridNode?: string; |
There was a problem hiding this comment.
Let's call this gridUrl or nodeGridUrl?
lib/cmds/utils.ts
Outdated
| options.server = {}; | ||
| options.server.name = 'selenium'; | ||
| options.server.runAsNode = argv.standalone_node as boolean; | ||
| options.server.gridNode = argv.gridNode as string; |
There was a problem hiding this comment.
When grabbing things from the argv, we should use the selenium_grid_url and not the standalone_ alias
$webdriver-manager start --gridNode http://localhost:4444/grid/register