chrome-devtools-kotlin / org.hildan.chrome.devtools.protocol / org.hildan.krossbow.websocket.WebSocketClient / connectToChrome

connectToChrome

suspend fun WebSocketClient.connectToChrome(webSocketDebuggerUrl: String): ChromeBrowserSession

Connects to the Chrome debugger at the given webSocketDebuggerUrl.

The returned ChromeBrowserSession only provides a limited subset of the possible operations, because it is attached to the default browser target, not a page target. To attach to a specific target using the same underlying web socket connection, call ChromeBrowserSession.attachToPage or ChromeBrowserSession.attachToNewPage.