The 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 the current working directory. If no path is provided, the image won’t be saved to the disk.
options.format
string
png
Specify screenshot type. Acceptable values are jpeg and png.
options.omitBackground
boolean
false
Hides default white background and allows capturing screenshots with transparency. Not applicable to jpeg images.
options.quality
number
100
The quality of the image, between 0-100; Only applicable to jpeg only.
options.timeout
number
30000
Maximum time in milliseconds. Pass 0 to disable the timeout. Default is overridden by the setDefaultTimeout option on
BrowserContext or
Page.