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

Session::with_capabilities_and_connector hides the WebDriver response #195

Open
OtaK opened this issue Nov 8, 2022 · 1 comment
Open

Comments

@OtaK
Copy link

OtaK commented Nov 8, 2022

Hi!

I'm currently implementing a WASM browser-only test runner based on WebDriver & fantoccini and I was thinking of using WebDriver BiDi protocol to follow progress on tests.

But following up on that I couldn't find a way to get the original NewSession command response which contains the webSocketUrl that webdriver creates for the communication - after providing the { "websocketUrl": true, ...} capability.

https://w3c.github.io/webdriver-bidi/#establishing

Would it be possible to save the session handshake response somewhere and access it later?

Note: If needed I can make the PR myself. I honestly don't think WebDriver BiDi support is needed in fantoccini right now as it's still a W3C draft - but nonetheless at least partially implemented in all webdriver implementations -. And it would pull in a couple of other dependencies that are websocket-related. But if we could just access the NewSession response and extract the websocket URL, we could establish the connection from the outside quite easily for those use-cases.

Thanks!

@jonhoo
Copy link
Owner

jonhoo commented Nov 17, 2022

That sounds like an entirely reasonable thing to add! I'm a fan of storing the NewSession response and making it accessible later 👍 A PR would be very welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants