-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat(selenium-grid): run webdriver-manager as a selenium-grid node (merge against master branch) #386
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The 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?
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok - done
lib/cli/index.ts
Outdated
@@ -139,6 +144,7 @@ yargs | |||
.option(SELENIUM_PORT, seleniumPort) | |||
.option(STANDALONE, standaloneOption) | |||
.option(STANDALONE_NODE, standaloneNodeOption) | |||
.option(GRID_NODE, gridNodeOption) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will add this with .option and .alias. https://github.com/angular/webdriver-manager/blob/master/lib/cli/index.ts#L178
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok - done
lib/cmds/options.ts
Outdated
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call this gridUrl
or nodeGridUrl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok - done
lib/cmds/utils.ts
Outdated
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When grabbing things from the argv, we should use the selenium_grid_url
and not the standalone_
alias
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok - done
$webdriver-manager start --gridNode http://localhost:4444/grid/register