Skip to main content
Version: 21.3.7

ScreenshotOptions interface

Signature:

export interface ScreenshotOptions

Properties

PropertyModifiersTypeDescriptionDefault
captureBeyondViewportoptionalbooleanCapture the screenshot beyond the viewport.true
clipoptionalScreenshotClipSpecifies the region of the page to clip.
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
optimizeForSpeedoptionalbooleanfalse
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'