chrome-devtools-kotlin / org.hildan.chrome.devtools.targets / attachToPage

attachToPage

suspend fun ChromeBrowserSession.attachToPage(targetId: TargetID): ChromePageSession

Creates a new ChromePageSession attached to the page target with the given targetId. The new session shares the same underlying web socket connection as this ChromeBrowserSession.

If the given ID corresponds to a target that is not a page, an exception is thrown.