Skip to content

Steps

Steps appear under setup in a recipe, under steps in a macro, and under steps inside a repeat or each block. Each step is a mapping led by one verb.

screenshots/recipes/order-row.yaml
setup:
  - click: { role: button, name: Orders }
  - fill: { label: Search }
    value: Acme
  - wait: { css: '.order-row' }
    comment: the list has settled, so the row can be measured
Step Extra keys Effect
goto: <url>—Navigate the current page
openPage: <url>as, viewportOpen a second page and name it
usePage: <name>—Switch which page later steps drive

Pointer

Step Extra keys Effect
click: <query>—Click an element
dblclick: <query>—Double-click an element
hover: <query>—Move the pointer onto an element
scrollIntoView: <query>—Scroll an element into view

Input

Step Extra keys Effect
fill: <query>valueSet an input's value
type: <text>onType text, optionally after focusing an element
press: <key>onPress a key, optionally after focusing an element
select: <query>option, optionLabelChoose an option by value or visible text
check: <query>—Tick a checkbox
uncheck: <query>—Untick a checkbox
blur: <query>—Remove focus
readValue: <query>asRead an input's value into a variable

Waiting

Step Effect
wait: <ms>Wait a fixed number of milliseconds
wait: <query>Wait until an element exists, bounded by site.timeout

Dialogs

Step Extra keys Effect
dialog: acceptvalueAccept every dialog from here on. value answers a prompt()
dialog: dismiss—Dismiss every dialog from here on

Covers alert, confirm, prompt and beforeunload. The setting holds until another dialog step replaces it, and applies to a page opened after it. Unset, dialogs are dismissed — see Capture a page after interaction.

screenshots/recipes/order-deleted.yaml
name: order-deleted
setup:
  - dialog: accept
  - click: { role: button, name: Delete }
  - wait: { text: Order deleted }
clip: { css: '.notice' }

Blocks

Step Extra keys Effect
use: <macro>withRun a macro, overriding its defaults
repeat: <n>stepsRun steps n times, up to 1000
each: <list>as, stepsRun steps once per item
optional: [steps]—Run steps, ignoring failures
screenshots/recipes/order-list.yaml
setup:
  - repeat: 3
    steps:
      - click: { role: button, name: Load more }
  - each: [Acme Corp, Globex]
    as: customer
    steps:
      - fill: { label: Search }
        value: $customer
  - optional:
      - click: { role: button, name: Dismiss }

Keys any step accepts

Key Effect
commentA note for the reader; ignored at run time

comment rides alongside a verb rather than being one, so a comment on its own is not a step.

Variables

as names a value the following steps can read. readValue: … as: total binds $total for the rest of the setup; each: … as: order binds $order for its own steps only. Substitution happens in steps and nowhere else — see references.

Not available

There is no step that evaluates JavaScript. See Why recipes cannot run code.