Page

class Page

Interaction with a single page target of a running browser.

Parameters

cdp

the protocol connection to the page's debugger

Functions

Link copied to clipboard
suspend fun evaluateBoolean(expression: String): Boolean

Evaluates a JavaScript expression on the page.

Link copied to clipboard
suspend fun evaluateNumber(expression: String): Double

Evaluates a JavaScript expression on the page.

Link copied to clipboard
suspend fun navigate(url: String)

Navigates the page to url.

Link copied to clipboard
suspend fun printToPdf(params: JsonObject, out: File)

Prints the page to a PDF file, streamed in chunks to avoid holding the whole document in memory.