ChildSession

A target session that is a child of a browser session, usually created when attaching to a target from the root browser session.

Inheritors

Properties

Link copied to clipboard

Info about this session and its underlying target.

Link copied to clipboard
abstract val parent: BrowserSession

The parent browser session that created this target session.

Functions

Link copied to clipboard

Adapts this ChildSession to a PageSession. If the attached target is not of a compatible type, this function throws an exception.

Link copied to clipboard

Adapts this ChildSession to a ServiceWorkerSession. If the attached target is not of a compatible type, this function throws an exception.

Link copied to clipboard

Adapts this ChildSession to a SharedWorkerSession. If the attached target is not of a compatible type, this function throws an exception.

Link copied to clipboard

Adapts this ChildSession to a WorkerSession. If the attached target is not of a compatible type, this function throws an exception.

Link copied to clipboard
abstract suspend fun close(keepBrowserContext: Boolean = false)

Closes this session and its target. If the target is a page, the tab gets closed.

Link copied to clipboard
abstract suspend fun closeWebSocket()

Closes the underlying web socket connection, effectively closing every session based on the same web socket connection.

Link copied to clipboard
abstract suspend fun detach()

Detaches this session from its target, effectively closing this session and all its child sessions, but without closing the corresponding target (this leaves the tab open in the case of a page session).

Link copied to clipboard
abstract fun unsafe(): AllDomainsTarget

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