-
Notifications
You must be signed in to change notification settings - Fork 125
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: expose the returned remote capabilities on the Client #223
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.
This is a great addition, thank you! Left a few questions, but none of them major.
I updated the PR and addressed your comments:
|
Codecov Report
|
Oh right, fixed that by introducing our own |
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.
Nice! Very nearly there 🎉
Also, you may want to merge from |
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.
Thanks!
The test checking that The other failing test seems unrelated. |
Totally fine to bump the minimum version of |
Great! So I bumped |
I'd generally prefer only bumping it to what we actually need (what goes in Cargo.toml is a minimum version after all). But not the end of the world if it preserves MSRV |
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.
Thank you!
Released in v0.20.0-rc.7 🎉 |
Thanks a lot for your help on this PR and for the release! |
This would tackle #195 by storing the remote capabilities (obtained with the new session response) in the
Client
, and exposing them via a public getter for later use.This internally leverages the already existing
webdriver::response::NewSessionResponse
to map the response.Being able to access the remote capabilities is necessary to be able to obtain the
webSocketUrl
remote capability and establish a WebDriver BiDi connection.Notes:
Client
because it was the easiest, not sure if it would make more sense to have them on theSession
instead..remote_capabilities()
, as it exposes the capabilities returned by the remote end, maybe you would prefer another name as I don't thinkfantoccini
uses the local end/remote end terminology from the W3C specification..remove()
/.insert()
-back-in-case-of-error JSON value extraction with.get()
/.to_owned()
as we now also need to access capabilities as well; do you think it would be better to avoid this clone?