chrome Web Socket
Connects to the Chrome debugger at the given webSocketDebuggerUrl.
This function expects a web socket URL (not HTTP). It should be something like:
ws://localhost:9222/devtools/browser/b0b8a4fb-bb17-4359-9533-a8d9f3908bd8Content copied to clipboard
If you only have the debugger's HTTP URL at hand (e.g. http://localhost:9222), create a ChromeDPClient instead, and then connect to the web socket using ChromeDPClient.webSocket.
This HttpClient must have the WebSockets plugin installed, as well as the ContentNegotiation plugin with Kotlinx Serialization JSON.
The returned BrowserSession only provides a limited subset of the possible operations, because it is attached to the default browser target, not a page target. To create a new page/tab, use BrowserSession.newPage and then interact with it through the returned PageSession.