Skip to main content
Version: 22.3.0

ScreenshotOptions interface


export interface ScreenshotOptions


captureBeyondViewportoptionalbooleanCapture the screenshot beyond the viewport.false if there is no clip. true otherwise.
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
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'