Lazy loading
If parts of a page load with a delay - data fetched from an API, images below the fold, charts rendered client-side - the capture can fire before they appear. The result is a snapshot with spinners or empty placeholders, and a diff on every run depending on what managed to load in time.
Wait for selector
The most reliable fix: in the suite settings (or on the affected snapshot), add a Wait for selector entry pointing at the element that appears last:
#dashboard-chart
//div[@class='loaded']
The capture waits until the element is present, so the snapshot always shows the fully rendered page. Prefer this over a fixed delay - it waits exactly as long as needed.
Delay
When there is no reliable element to wait for (e.g. a fade-in animation after data arrives), add a Delay in milliseconds before the capture. Delays are a blunt instrument: too short and the flakiness stays, too long and every snapshot slows down. Scope them to the snapshots that need them.
Timeout
The suite Timeout (default: 60 seconds) caps how long a capture can take, including wait-for-selector conditions. If heavy pages hit the cap, raise the timeout; the capture won't wait longer than that, so if a wait-for-selector never shows up, check that the selector matches the tested page.
Scriptless captures
The bdy tests capture command accepts the same controls, optionally scoped per domain:
bashbdy tests capture --sitemap https://example.com/sitemap.xml \ --waitFor "CSS=#content" "example.com::XPATH=//div[@class='loaded']" \ --delay "example.com::2000"$$$
Last modified on Jul 13, 2026