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

ChromePageSession

class ChromePageSession : AbstractTargetSession, RenderFrameTarget

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

Properties

parent

The parent session which created this page target.

val parent: ChromeBrowserSession

targetInfo

Info about the underlying page target.

val targetInfo: TargetInfo

Functions

close

Closes this page session.

suspend fun close(): Unit

detach

Detaches from this page session, leaving the tab open.

suspend fun detach(): Unit

Extension Functions

use

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

suspend fun <T> ChromePageSession.use(block: (ChromePageSession) -> T): T