-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Add browsername capabilities to Grid #8449
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.
The "stereotype" is used when taking an incoming new session request to figure out which slot may be able to help. Because of this, it should be pretty minimal. Why? Because the local end (the RemoteWebDriver
) tend to just ask for a particular browser name. As such, because everything added to the canonical/stereotypical capabilities MUST be matched in the request coming from the local end, you'll end up with a lot more failures when creating sessions.
java/client/src/org/openqa/selenium/chrome/ChromeDriverInfo.java
Outdated
Show resolved
Hide resolved
java/client/src/org/openqa/selenium/edgehtml/EdgeHtmlDriverInfo.java
Outdated
Show resolved
Hide resolved
java/client/src/org/openqa/selenium/firefox/GeckoDriverInfo.java
Outdated
Show resolved
Hide resolved
java/client/src/org/openqa/selenium/firefox/xpi/XpiDriverInfo.java
Outdated
Show resolved
Hide resolved
java/client/src/org/openqa/selenium/safari/SafariDriverInfo.java
Outdated
Show resolved
Hide resolved
java/client/src/org/openqa/selenium/safari/SafariTechPreviewDriverInfo.java
Outdated
Show resolved
Hide resolved
this.id = Require.nonNull("Node id", id); | ||
this.uri = Require.nonNull("Node uri", uri); | ||
this.isUp = isUp; | ||
this.maxSession = Require.nonNull("Node maxSession", maxSession); | ||
this.capabilities = Require.nonNull("Node capabilities", capabilities.toString()); |
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.
Better to convert this to a JSON blob rather than the string representation of a java datastructure.
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.
Once the nit is addressed, this LGTM
this.id = Require.nonNull("Node id", id); | ||
this.uri = Require.nonNull("Node uri", uri); | ||
this.isUp = isUp; | ||
this.maxSession = Require.nonNull("Node maxSession", maxSession); | ||
this.capabilities = Require.nonNull("Node capabilities", new Json().toJson(capabilities)); |
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.
Nit: Make this a private constant in the class, as some of the state picked up by reflection is stored.
OK. This looks good. Thank you! |
Partial-PR: #8020
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Motivation and Context
Types of changes
Checklist