CreateTargetRequest

@Serializable
data class CreateTargetRequest(val url: String, val width: Int? = null, val height: Int? = null, val browserContextId: BrowserContextID? = null, val enableBeginFrameControl: Boolean? = null, val newWindow: Boolean? = null, val background: Boolean? = null, val forTab: Boolean? = null)

Request object containing input parameters for the TargetDomain.createTarget command.

Constructors

Link copied to clipboard
constructor(url: String, width: Int? = null, height: Int? = null, browserContextId: BrowserContextID? = null, enableBeginFrameControl: Boolean? = null, newWindow: Boolean? = null, background: Boolean? = null, forTab: Boolean? = null)

Types

Link copied to clipboard
class Builder(val url: String)

A builder for CreateTargetRequest, which allows setting the optional parameters of the TargetDomain.createTarget command via a lambda.

Properties

Link copied to clipboard
val background: Boolean? = null

Whether to create the target in background or foreground (chrome-only, false by default).

Link copied to clipboard

The browser context to create the page in.

Link copied to clipboard

Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default).

Link copied to clipboard
val forTab: Boolean? = null

Whether to create the target of type "tab".

Link copied to clipboard
val height: Int? = null

Frame height in DIP (headless chrome only).

Link copied to clipboard
val newWindow: Boolean? = null

Whether to create a new Window or Tab (chrome-only, false by default).

Link copied to clipboard
val url: String

The initial URL the page will be navigated to. An empty string indicates about:blank.

Link copied to clipboard
val width: Int? = null

Frame width in DIP (headless chrome only).