saveScreenshot
open suspend override fun saveScreenshot(filename: Path?, format: ScreenshotFormat, fullPage: Boolean): String
Saves a screenshot of the page. This is not the same as Element.saveScreenshot, which saves a screenshot of a single element only.
Return
The path/filename of the saved screenshot.
Parameters
filename
Uses this as the save path. If "auto" or null, generates a filename based on the page URL and timestamp.
format
"jpeg" or "png" (defaults to "jpeg").
fullPage
When false (default), captures the current viewport. When true, captures the entire page.