chrome-devtools-kotlin / org.hildan.chrome.devtools.protocol / ChromeDPClient / webSocket

webSocket

suspend fun webSocket(): ChromeBrowserSession

Opens a web socket connection to interact with the browser target (root session, without session ID).

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.