Skip to Content

Steps

A step is one inline table with an id, usually a label, one verb key that says what it does, and the keys that go with that verb.

A step is one inline table with an id, usually a label, one verb key that says what it does, and the keys that go with that verb. A step names exactly one verb. Every step has an id (a use has none, since it stands for other steps), and the ids are unique inside the journey or person that holds them, after the expansion below.

VerbReads asGoes with
launch = trueStart the app. launch = false does nothing and is refused.
open = "/orders/42"Go to a path of the app. It begins with /, and never names another host.
tap = { ... }Tap an element, named by a selector.at, new_tab
type = "text"Type text. Or type = { ask = "the question" } to ask the person at the capture.into, clear, private
key = "Escape"Press a key.
back = trueGo back.
scroll = { dx = 0, dy = 400 }Scroll by this much. Both zero is refused.
idle = 3000Wait this many milliseconds.
upload = ["uploads/photo.png"]Choose files from the rig's folder. They must exist there.into
menu = ["File", "Close Project"]Choose an item of the app's menu, by its path.
sign_in = "shopper"Sign in as a person of [[people]].
state = "old-order"Go into a state of [[states]].
use = "home"Put a run of [steps] here.

The keys beside a verb:

KeyMeaning
id, labelThe step's id, and a line for the person.
intoThe element a type or upload goes into. Required for an upload, optional for a type.
at = { x = 0.5, y = 0.2 }Where in its target a tap lands, as fractions from 0 to 1. The middle for none.
new_tab = trueFollow the new tab a tap opens.
clear = trueEmpty the field before typing.
private = trueKeep what is typed out of every picture and file. Use it for a code or a password.
expect = { ... }What must hold once the step has settled. See Expectations.
screen, surface, windowThe name of the screen the step ends on, how it sits in the app (a trace's surfaces are tab, screen, cover, sheet, pane, gate and external), and the window it is in, for a core that takes them from the rig. The check shows these words as they are and doesn't test them.
timeout_ms, settle_ms, deadline_msLimits in milliseconds, for a core that honours them.

A key that doesn't go with the step's verb is refused: into on a tap, or at on a type.

A type that asks is written type = { ask = "The code staging just mailed you", name = "code" }. The question is ask. name names the answer where the question won't do. Its answer is a secret unless you write secret = false, and no answer is kept anywhere.

Selectors

A selector names an element. The keys a core takes depend on the app. A page has css, role with name, label, text, test_id and placeholder. A window has key, role and label. Beside those, exact = true matches a text whole, and nth takes the n-th match counting from 0.

A selector must name something with css, role, label, text, test_id, placeholder or key. name alone doesn't name an element, so it goes with a role. A selector that names nothing would match the first element there is, and the check refuses it.

Expectations

expect says what must hold once a step has settled. It has to say at least one thing.

KeyHolds when
shown = { ... }the element the selector names is on the screen
gone = { ... }it is not
url = "^/en/orders/42/refund"the address matches this regular expression. It must be one that compiles.
status = 404the page answered with this HTTP status, from 100 to 599
crash = truea flag carried to the core as written. PitaFix gives it no meaning of its own, so what it makes of it is that core's to say.

On this page