Add browsername capabilities to Grid - #8449
Conversation
shs96c
left a comment
There was a problem hiding this comment.
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.
| 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.
Better to convert this to a JSON blob rather than the string representation of a java datastructure.
shs96c
left a comment
There was a problem hiding this comment.
Once the nit is addressed, this LGTM
| 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.
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