Skip to content

Session::with_capabilities_and_connector hides the WebDriver response #195

@OtaK

Description

@OtaK

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions