webSocketUrl
With thewebSocketUrl capability set totrue a WebSocket server will be started in the browser, supporting bidirectional communication by using theWebDriver BiDi protocol.When theNew Session request has thewebSocketUrl capability set totrue, and the session starts successfully, the value of thecapabilities field in the response will have awebSocketUrl property set to the URL of the WebSocket server.
In this article
Example
Requesting the WebSocket URL by setting thewebSocketUrl capability totrue:
Request:
http
POST /session HTTP/1.1{"capabilities": {"alwaysMatch": {"webSocketUrl": true}}}Response:
json
{ "value": { "capabilities": { "webSocketUrl": "ws://localhost:9222/session/571f206f-c3fe-794c-9218-77fa89595eb9" }, "sessionId": "571f206f-c3fe-794c-9218-77fa89595eb9" }}