chrome-devtools-kotlin / org.hildan.chrome.devtools.domains.domsnapshot / DOMSnapshotDomain

DOMSnapshotDomain

class DOMSnapshotDomain

This domain facilitates obtaining document snapshots with DOM, layout, and style information.

Functions

captureSnapshot

Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.

suspend fun captureSnapshot(input: CaptureSnapshotRequest): CaptureSnapshotResponse

disable

Disables DOM snapshot agent for the given page.

suspend fun disable(): Unit

enable

Enables DOM snapshot agent for the given page.

suspend fun enable(): Unit

getSnapshot

Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.

suspend fun getSnapshot(input: GetSnapshotRequest): GetSnapshotResponse