Flow commands
Every step in a flow is one command. Selector-taking commands accept a bare string (visible text) or an object selector — see Flow file & selectors.
| Command | Summary | web | android | ios |
|---|---|---|---|---|
launchApp |
Launch (optionally reset) the app | ✓ | ✓ | ✓ |
stopApp |
Stop the app | ✓ | ✓ | ✓ |
tapOn |
Tap an element | ✓ | ✓ | ✓ |
longPressOn |
Long-press an element | ✓ | ✓ | ✓ |
doubleTapOn |
Double-tap an element | ✓ | ✓ | ✓ |
inputText |
Type into the focused field | ✓ | ✓ | ✓ |
pressKey |
Press a hardware/keyboard key | ✓ | ✓ | ✓ |
clearText |
Clear the focused field | ✓ | ✓ | ✓ |
clearState |
Wipe app data | ✓ | ✓ | ✓ |
assertVisible |
Assert an element is visible | ✓ | ✓ | ✓ |
assertNotVisible |
Assert an element is absent | ✓ | ✓ | ✓ |
waitForVisible |
Wait until visible | ✓ | ✓ | ✓ |
copyText |
Copy an element’s text into a var | ✓ | ✓ | ✓ |
assertTrue |
Assert over substituted values | ✓ | ✓ | ✓ |
scroll |
Scroll the screen | ✓ | ✓ | ✓ |
scrollUntilVisible |
Scroll until an element appears | ✓ | ✓ | ✓ |
swipe |
Swipe by points or direction | ✓ | ✓ | ✓ |
openLink |
Open a deep link / URL | ✓ | ✓ | ✓ |
setLocation |
Mock GPS location | ✓ | ✓ | ✓ |
grantPermissions |
Grant runtime permissions | ✓ | ✓ | ✓ |
hideKeyboard |
Dismiss the keyboard | ✓ | ✓ | — |
back |
Navigate back | ✓ | ✓ | — |
runFlow |
Run a sub-flow (include) | ✓ | ✓ | ✓ |
repeat |
Repeat a block | ✓ | ✓ | ✓ |
request |
Declarative HTTP request | ✓ | ✓ | ✓ |
launchApp
Section titled “launchApp”Launch the app under test. Object form: { appId, clearState, stopApp } for a cold/fresh start.
- launchApp: "appId"stopApp
Section titled “stopApp”Terminate the app under test.
- stopApp: trueTap an element by selector (text/id/…) or { point: "x, y" }. Off-screen targets are scrolled into view.
- tapOn: "text"longPressOn
Section titled “longPressOn”Press and hold an element.
- longPressOn: "text"doubleTapOn
Section titled “doubleTapOn”Tap an element twice in quick succession.
- doubleTapOn: "text"inputText
Section titled “inputText”Type text into the currently focused input.
- inputText: "text"pressKey
Section titled “pressKey”Press a hardware/keyboard key (enter, tab, back, volume up…) or a combo like cmd+shift+p. Maestro key names, case-insensitive.
- pressKey: enterclearText
Section titled “clearText”Clear the focused text field (iOS needs the XCUITest driver).
- clearText: trueclearState
Section titled “clearState”Reset the app’s stored state (fresh install). iOS is simulator-only, best-effort.
- clearState: trueassertVisible
Section titled “assertVisible”Fail the step unless the selector matches a visible element.
- assertVisible: "text"assertNotVisible
Section titled “assertNotVisible”Fail the step if the selector matches a visible element.
- assertNotVisible: "text"waitForVisible
Section titled “waitForVisible”Poll until the selector is visible. Object form adds { timeout } (ms).
- waitForVisible: "text"copyText
Section titled “copyText”Read an element’s text for later ${} substitution / assertTrue.
- copyText: "text"assertTrue
Section titled “assertTrue”Assert { equals | contains: [a, b] } over ${}-substituted values.
- assertTrue: equals: [a, b]scroll
Section titled “scroll”Scroll up/down/left/right.
- scroll: downscrollUntilVisible
Section titled “scrollUntilVisible”Repeatedly scroll until the selector becomes visible.
- scrollUntilVisible: "text"Swipe { start, end } (px or % of screen) or a direction.
- swipe: start: "50%, 80%" end: "50%, 20%"openLink
Section titled “openLink”Open a URL or deep link (web navigate / iOS idb open / Android am start VIEW).
- openLink: "url"setLocation
Section titled “setLocation”Override device location { lat, lon }.
- setLocation: lat: 0 lon: 0grantPermissions
Section titled “grantPermissions”Grant common runtime permissions (iOS simctl / Android pm grant / web CDP).
- grantPermissions: truehideKeyboard
Section titled “hideKeyboard”Dismiss the on-screen keyboard. Not available on iOS.
Platforms: web, android
- hideKeyboard: trueGo back (browser history / Android hardware back). Not available on iOS (no hardware back).
Platforms: web, android
- back: truerunFlow
Section titled “runFlow”Include another flow file, or inline { commands, when }. when takes { visible | notVisible: selector } or { platform: android | [web, ios] }.
- runFlow: "file"repeat
Section titled “repeat”Repeat a block { times | while, commands }.
- repeat: times: 2 commands: -request
Section titled “request”HTTP call for API testing: { method, url, headers, query, json | body, auth, extract, assert, retryUntil, timeout }. extract maps JSONPath values into ${vars} shared with UI steps; assert checks status (a code or "2xx"), json equalities / { contains }, headers and a JSON schema; retryUntil polls until the assertion passes. With device: none a flow is pure API — no device is resolved or booted.
- request: url: "url"