Skip to content

Steps

Steps live under setup, which runs before anything is measured — and under steps inside a repeat, each or optional block. Each step is a mapping led by one verb; some take extra keys alongside it.

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 Does
goto: <url>Navigate
click: <query>Click an element
dblclick: <query>Double-click
hover: <query>Move the pointer onto an element
fill: <query> + value:Set the value of an input
select: <query> + option:Choose an option; optionLabel: matches visible text
check: / uncheck: <query>Set a checkbox
press: <key> + on:Press a key, optionally after focusing an element
type: <text> + on:Type text
blur: <query>Remove focus
scrollIntoView: <query>Scroll an element into view
wait: <ms | query>Wait a fixed time, or until an element exists
readValue: <query> + as:Read an input's value into a variable
use: <macro> + with:Run a macro
repeat: <n> + steps:Run steps n times, up to 1000
each: <list> + as:, steps:Run steps once per item
optional: [steps]Run steps, ignoring failures
openPage: <url> + as:Open a second page and name it; viewport: sizes it
usePage: <name>Switch which page later steps drive

Where a step takes as:, it is naming something the steps after it can read: readValue: … as: total puts what an input holds into $total, and each: … as: order binds $order for one pass of its own steps. See writing a reference.

Any step also takes comment:, for a note to the next person reading the recipe. It rides alongside a verb rather than being one, so a comment on its own is not a step.

There is no step that evaluates JavaScript. If a screenshot cannot be described with these, that is a missing verb rather than a missing escape hatch — and it gets added, with the shot that needs it as the evidence.