accept cookies
Dismiss a cookie / consent banner via a fixed button allowlist
No-arg helper that clicks the first unique visible allowlist button for cookie / consent banners.
Syntax
When I accept cookiesRequirements
| Item | Contract |
|---|---|
| Element / control shape | Allowlist labels resolved via general resolve (same as labeled click/fill chain) — typically real buttons matching the allowlist text |
| How the label binds | Fixed allowlist order below; first unique visible hit wins |
| Qualifiers that change resolve | None (no-arg command) |
| Platform | Web only (v1) |
| Wrong shape → use instead | Custom consent copy → click on the exact label. Browser dialogs → accept |
See also UI contracts.
Allowlist (order)
Accept allAccept AllAcceptAgreeI agree
First unique visible hit wins. Zero matches → clear error. Does not scan the whole DOM with CSS.
Examples
When I accept cookies
Then I should see "Cookies: accepted"Notes
- Distinct from accept (browser dialogs).
- Each allowlist attempt uses labeled action resolve (auto-wait).
- Web only for v1. You can still
click on "Accept all"manually.