Assert API
Several DOM rules in one navigation — pass/fail with results[] for CI and smoke tests.
What you can do with assert
Multiple DOM rules in one navigation: visible, text, counts, href, attribute — pass/fail including soft fails for CI gates and smoke tests.
- Up to 25 rules per call
- Operators: visible, exists, count_min/max, contains, matches, href_contains, attr, adaptive, …
- Soft fails that do not kill the entire run
- Clear passed boolean plus results[]
Two rules in one call — selector, visible, and count_min are editable.
Not run yet
h1 visible=true · a count_min=1
Endpoints & parameters
Choose an endpoint — below you'll see an example request and explanations for all relevant parameters.
POST /v1/assert
Multi-rule assertions after one page load.
Example request
{
"url": "https://example.com/pricing",
"width": 1280,
"height": 720,
"scroll_into_view": true,
"dismiss_cookie_banner": true,
"assert": [
{
"selector": "h1",
"visible": true,
"contains": "Pricing"
},
{
"selector": "a[href*=\"signup\"]",
"visible": true,
"href_contains": "signup"
},
{
"selector": ".plan",
"count_min": 3
}
]
}Parameters
urlstring requiredTarget URL.
assertarray (1–25) requiredRules; each requires selector.
assert[].visible / exists / not_coveredbooleanVisibility/existence expectations.
assert[].count / count_min / count_maxnumberCount expectations.
assert[].contains / text / matchesstringCheck text content.
assert[].href_contains / attrvariousLink and attribute checks.
assert[].softbooleanSoft fail counts but does not kill passed.
scroll_into_view / ignore_selectorsvariousHelpers for overlays.
width / heightnumberViewport.
dismiss_cookie_bannerbooleanAttempts to dismiss known cookie banners before measuring or checking.
wait_for_selectorstringWaits for a CSS selector before continuing.
wait_ms / settle_msnumberAdditional wait time after loading (depends on endpoint).
devicestringPlaywright device preset; overrides width/height/UA when set.
color_scheme'light'|'dark'|'no-preference'Preferred color scheme in the browser.
block_adsbooleanBlocks known ad and tracker requests.
capture_xhrstringGlob or substring for XHR/fetch URLs whose bodies Scout captures (max. 20).
fetch_mode'browser'|'http'http loads without JavaScript (static document). Default: browser.
solve_captchabooleanBest-effort Turnstile/checkbox on your own sites. Cloud: domain verify. Self-host: always allowed.
record_harbooleanOptionally records HAR (where supported by the endpoint).
respect_robotsbooleanRespect robots.txt (default: on).