For AI agents: a documentation index is available at /llms.txt
Skip to main content

ScreenshotOptions

Properties

PropertyTypeDescription
captureBeyondViewport?booleanCapture the screenshot beyond the viewport. Default: False if there is no clip. True otherwise
clip?ScreenshotClipSpecifies the region of the page/element to clip
fromSurface?booleanCapture the screenshot from the surface, rather than the view. Default: True
fullPage?booleanWhen True, takes a screenshot of the full page. Default: False
omitBackground?booleanHides default white background and allows capturing screenshots with transparency. Default: False
optimizeForSpeed?booleanOptimize image encoding for speed, not for resulting size. Default: False
path?string-
quality?numberQuality of the image, between 0-100. Not applicable to png images.
selector?stringThe CSS selector of the element on the page you want to screenshot
timeout?numberThe maximum amount of time, in milliseconds, to wait for the screenshot to be taken. Default timeout is 30 seconds, or 30000.
type?ScreenshotTypeThe final format of the screenshot
waitForImages?booleanWhen true, waits for all images on the page to load before taking the screenshot. Default: False