captureScreenshot

Capture page screenshot.


suspend fun captureScreenshot(format: String? = null, quality: Int? = null, clip: Page.Viewport? = null, fromSurface: Boolean? = null, captureBeyondViewport: Boolean? = null, optimizeForSpeed: Boolean? = null): Page.CaptureScreenshotReturn

Capture page screenshot.

Parameters

format

Image compression format (defaults to png).

quality

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

clip

Capture the screenshot of a given region only.

fromSurface

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

captureBeyondViewport

Capture the screenshot beyond the viewport. Defaults to false.

optimizeForSpeed

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