StrikekitStrikekit

accept

Arm acceptance of the next matching browser dialog

Arm the next browser dialog whose message contains the quoted fragment, then run the step that opens it. Must run before the triggering action.

Syntax

When I accept "<message-fragment>"

Requirements

ItemContract
Element / control shapeNone — arms the next browser dialog (alert/confirm/prompt). Not a DOM click target
How the label bindsQuoted string is a message fragment (payload)
Qualifiers that change resolveNone
PlatformWeb
Wrong shape → use insteadCookie banners → accept cookies or click. In-page modals → click / should, not accept

When it fails

  • Dialog message does not contain the fragment → dialog may be dismissed without accept.
  • Must run before the step that opens the dialog.

See also UI contracts.

Examples

When I accept "Are you sure?"
When I click on "Delete"

Notes

  • The quoted string is a payload fragment match against the dialog message.
  • Pair with dismiss for cancel / dismiss flows.

On this page