API Reference / @gtkx/testing / screenshot
Variable: screenshot
constscreenshot: (widget,options?) =>Promise<ScreenshotResult>
Defined in: screenshot.d.ts:10
Captures a PNG snapshot of a widget, retrying until it has a paintable size.
Parameters
widget
Gtk.Widget
The widget to render to an image.
options?
Optional scale, timeout, and retry interval.
Returns
Promise<ScreenshotResult>
The base64-encoded PNG data along with its mime type and dimensions.