Skip to content

Screenshots

Wait for the UI you care about, then capture it:

await I.find('Dashboard').visible();
let image = await app.screenshot('dashboard', { fullPage: true });

Managed browsers capture the original app page with the reporter hidden. The default is a viewport image; fullPage: true captures the whole page without changing its configured viewport. Chromium briefly pauses app JavaScript during full-page and element captures so its temporary resize cannot reach app handlers. Queued callbacks resume afterward; CSS animation and backend work continue. The result includes path, url, dimensions, and pixel ratio. Images appear in live and saved reports.

await app.screenshot('dashboard', {
mask: [...app.document.querySelectorAll('[data-private]')],
maskColor: '#ff00ff',
animations: 'disabled',
caret: 'hide',
});
await app.screenshot('card', {
element: await I.find('$(.card)'),
});

Masks cover current app elements in the PNG. maskColor takes an opaque #RRGGBB color. Element capture uses the element’s document bounds, including content below the fold, without scrolling or resizing. Fractional edges round outward; element capture can’t combine with fullPage or masks.

Animations and carets stay unchanged by default. With suppression enabled, finite animations finish, infinite animations pause, and temporary styles are removed afterward. Dyno waits for fonts and checks the document and dimensions, but other app work can continue. Use Interactor to choose the state first.

Always await captures and viewport changes. They run in order; navigation, Stop, resize, or lost ownership invalidates pending captures. Leaving operations unfinished fails the test or hook.

URL-only runs can’t take screenshots. Required captures fail. Use { optional: true } only when the functional test is useful without an image; Dyno returns and reports a skipped image. Provider and storage errors still fail.

Reported PNGs stay on disk after cleanup; interrupted runs discard unreported images. Capture metadata includes the browser/provider/version, viewport, and pixel ratio. Dyno saves attachments; your visual-comparison service owns baselines and diffs.