captureScreenshotToFile

suspend fun PageDomain.captureScreenshotToFile(outputImagePath: Path, options: CaptureScreenshotRequest.Builder.() -> Unit = {})(source)

Captures a screenshot of the current page based on the given options, and stores the resulting image into a new file at the given outputImagePath. If the file already exists, it is overwritten.