CaptureScreenshotRequest

@Serializable
data class CaptureScreenshotRequest(val format: ScreenshotFormat? = null, val quality: Int? = null, val clip: Viewport? = null, val fromSurface: Boolean? = null, val captureBeyondViewport: Boolean? = null, val optimizeForSpeed: Boolean? = null)

Request object containing input parameters for the PageDomain.captureScreenshot command.

Constructors

Link copied to clipboard
constructor(format: ScreenshotFormat? = null, quality: Int? = null, clip: Viewport? = null, fromSurface: Boolean? = null, captureBeyondViewport: Boolean? = null, optimizeForSpeed: Boolean? = null)

Types

Link copied to clipboard
class Builder

A builder for CaptureScreenshotRequest, which allows setting the optional parameters of the PageDomain.captureScreenshot command via a lambda.

Properties

Link copied to clipboard

Capture the screenshot beyond the viewport. Defaults to false.

Link copied to clipboard
val clip: Viewport? = null

Capture the screenshot of a given region only.

Link copied to clipboard

Image compression format (defaults to png).

Link copied to clipboard
val fromSurface: Boolean? = null

Capture the screenshot from the surface, rather than the view. Defaults to true.

Link copied to clipboard

Optimize image encoding for speed, not for resulting size (defaults to false)

Link copied to clipboard
val quality: Int? = null

Compression quality from range 0..100 (jpeg only).