Skip to content
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

W3C WebDriver protocol support #450

Closed
shs96c opened this issue May 26, 2018 · 7 comments
Closed

W3C WebDriver protocol support #450

shs96c opened this issue May 26, 2018 · 7 comments
Milestone

Comments

@shs96c
Copy link

shs96c commented May 26, 2018

The next major release of Selenium (version 4) will see a major change in the wire protocol: language bindings will move from supporting the original wire protocol to the new W3C webdriver protocol. Specifically, we expect the .Net, Ruby, Python, and JS bindings to all only support the webdriver protocol. It is likely that additional effort will need to be taken by Java developers to continue using the original wire protocol.

Selenoid needs to support the matching algorithm outlined in the spec, as well as ensuring that metadata is passed through to downstream nodes.

Our current working estimate is that Selenium 4 will ship before October, 2018, though (as with all OSS) this is only our own estimate.

@vania-pooh vania-pooh added this to the 1.6.2 milestone May 26, 2018
@vania-pooh
Copy link
Member

@shs96c sure, we are following the news about W3C Selenium standard adoption. Right now we already support working directly with latest Geckodriver releases as well as alwaysMatch stuff. In this issue let's review the spec again and make core protocol changes are supported. Btw, when do you expect to have the spec finally accepted as recommendation?

@shs96c
Copy link
Author

shs96c commented May 28, 2018

The spec should become a recommendation on the 31st May.

Once the session is established, something like selenoid shouldn't need many changes. Things that differ are:

  • The matching of capabilities when creating a session. It sounds like you look at alwaysMatch, but a quick scan of the source suggests your not merging this with firstMatch
  • desiredCapabilities is going away in the w3c spec, but it doesn't look like you're that dependent on them.
  • It doesn't look like there's validation of capability names going on for W3CCaps, which is mandated by the spec. Technically an endpoint node is the only one that needs to care, but it reduces resource consumption if intermediate nodes do this processing.
  • I guess you've already noticed that the JSON Wire Protocol and the W3C protocol return the session id in different places in the return value for New Session.

Feel free to hop on the #selenium IRC channel on Freenode or our Slack channel (which is mirrored to IRC) if you'd like clarification on any of the areas or to talk about implementation strategies.

@vania-pooh
Copy link
Member

@shs96c ok, thanks.

@vania-pooh vania-pooh modified the milestones: 1.6.2, 1.6.3 Jun 6, 2018
@vania-pooh vania-pooh modified the milestones: 1.7.0, 1.7.1, 1.7.2 Jul 16, 2018
@vania-pooh vania-pooh modified the milestones: 1.7.2, 1.7.3 Aug 7, 2018
@vania-pooh vania-pooh modified the milestones: 1.7.3, 1.7.4 Oct 9, 2018
@vania-pooh vania-pooh modified the milestones: 1.8.1, 1.8.2 Oct 25, 2018
@vania-pooh vania-pooh modified the milestones: 1.8.2, 1.8.3 Nov 12, 2018
@vania-pooh vania-pooh modified the milestones: 1.8.3, 1.8.4 Dec 14, 2018
@vania-pooh vania-pooh modified the milestones: 1.8.4, 1.8.5, 1.8.6 Dec 24, 2018
@vania-pooh
Copy link
Member

vania-pooh commented May 8, 2019

Also need to correctly process capabilities key.

@vania-pooh vania-pooh removed this from the 1.9.2 milestone Jun 10, 2019
@vania-pooh
Copy link
Member

Ok, we decided to just ignore firstMatch key as nobody seems to be really using it. Some client-side libraries are just always sending an empty array there. The only thing we have to fix is - completely drop vendor-specific selenoid:options key before actually proxying request to upstream webdriver. This will be fixed in #771. Closing this one.

@shs96c
Copy link
Author

shs96c commented Dec 19, 2019

The java bindings will fill firstMatch if necessary, and some of the other language bindings prefer using firstMatch to alwaysMatch. I’d consider reopening this.

The algorithm for converting the New Session payload is incredibly simple: just merge alwaysMatch into every firstMatch and throw an error if there are duplicate keys. Then just iterate over the generated list and find the first one your hub supports.

@vania-pooh
Copy link
Member

@shs96c ok, let's reopen and see what could be done with it.

@vania-pooh vania-pooh reopened this Dec 19, 2019
@vania-pooh vania-pooh added this to the 1.10.0 milestone Jan 9, 2020
aandryashin added a commit that referenced this issue Jan 13, 2020
Supporting firstMatch in capabilities (fixes #450)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants