API Reference / @gtkx/testing / captureAndSaveScreenshot
Variable: captureAndSaveScreenshot
constcaptureAndSaveScreenshot: (selector?,options?) =>Promise<ScreenshotResult>
Defined in: screenshot.d.ts:26
Captures a screenshot of a toplevel window, writes it to a temporary file, logs its path, and returns the image data.
Parameters
selector?
Chooses the window by index, title substring, or regular expression; defaults to the first toplevel.
options?
Optional scale, timeout, and retry interval.
Returns
Promise<ScreenshotResult>
The base64-encoded PNG data along with its mime type and dimensions.