Skip to main content
Version: Next

ScreenshotOptions interface

Signature:

export interface ScreenshotOptions

Properties

PropertyModifiersTypeDescriptionDefault
captureBeyondViewportoptionalbooleanCapture the screenshot beyond the viewport.true
clipoptionalScreenshotClipAn object which specifies the clipping region of the page.
encodingoptional'base64' | 'binary'Encoding of the image.binary
fromSurfaceoptionalbooleanCapture the screenshot from the surface, rather than the view.true
fullPageoptionalbooleanWhen true, takes a screenshot of the full page.false
omitBackgroundoptionalbooleanHides default white background and allows capturing screenshots with transparency.false
pathoptionalstringThe file path to save the image to. The screenshot type will be inferred from file extension. If path is a relative path, then it is resolved relative to current working directory. If no path is provided, the image won't be saved to the disk.
qualityoptionalnumberQuality of the image, between 0-100. Not applicable to png images.
typeoptional'png' | 'jpeg' | 'webp'png