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

AbstractTargetSession

sealed class AbstractTargetSession

A protocol session, created when attached to a target.

Functions

close

Closes this session and the underlying web socket connection. This effectively closes every session based on the same connection.

suspend fun close(): Unit

unsafe

Gives access to all domains of the protocol, regardless of the type of this session.

fun unsafe(): AllDomainsTarget

Extension Functions

use

Performs the given operation in this session and closes the connection.

suspend fun <T, S : AbstractTargetSession> S.use(block: (S) -> T): T

Inheritors

ChromeBrowserSession

A browser session, usually created when initially connecting to the browser's debugger.

class ChromeBrowserSession : AbstractTargetSession, BrowserTarget

ChromePageSession

A page session, usually created when attaching to a page from the root browser session.

class ChromePageSession : AbstractTargetSession, RenderFrameTarget