Maestro Driver

Peach runs Maestro-compatible YAML flows through the peach test CLI, a drop-in for the real maestro CLI. Point it at your existing .maestro/ folder and it runs the flows against the browser simulator, no Mac or device needed.

terminal
peach test # auto-discovers ./.maestro or ./maestro
peach test <flow-or-dir> # run one flow file, or the selected flows in a workspace
peach test init # scaffold a starter .maestro/login.yaml
peach test --list-compat # print the full verb support matrix

Useful flags: --env KEY=VALUE (repeatable), --headed, --record, --preview / --preview-open (upload a recording to a preview link), --slow <ms>. --format junit --output results.xml writes a JUnit report. --device selects the simulator device model. --continuous warns and runs once; watch mode is not implemented. HTML reports are not implemented.

There is no programmatic driver class; the CLI is the surface. Run peach test --list-compat for the authoritative, always-current matrix; the summary below is a guide.

Supported steps

Interaction and input:

- tapOn: 'Button Text'
- tapOn: { id: 'my-button' }
- tapOn: { text: 'Submit', index: 1 }
- tapOn: { text: 'Row', childOf: { id: 'list' } }
- tapOn: { point: '100,200' }
- longPressOn: 'Item'
- inputText: 'hello world'
- eraseText: 5
- pressKey: 'Enter'
- dispatchKey: 'Escape' # peach extension
- hideKeyboard: true
- back: true

Navigation and scrolling:

- swipe: { direction: 'LEFT' }
- scroll: { direction: 'DOWN' }
- scrollTo: { id: 'footer' } # peach extension
- scrollUntilVisible:
element: 'Target Text'
direction: 'DOWN'
timeout: 10000
- pinch: { scale: 2 } # peach extension

Assertions and waiting:

- assertVisible: 'Welcome'
- assertVisible: { id: 'header' }
- assertNotVisible: 'Loading'
- assertTreeContains: 'Submit' # peach extension
- waitFor: { text: 'Ready', timeout: 5000 } # peach extension
- extendedWaitUntil: { visible: 'Done', timeout: 10000 }
- waitForAnimationToEnd: true
- wait: 2000 # peach extension: wait ms

Control flow, scripting, and capture:

- repeat:
times: 3
commands:
- tapOn: 'Next'
- waitForAnimationToEnd: true
- runFlow: 'sub-flow.yaml'
- runScript: 'setup.js' # full Maestro JS: http, json(), output, env, console.log
- evalScript: '${output.token = "abc"}'
- copyTextFrom: { id: 'code' } # then use ${maestro.copiedText}
- openLink: 'myapp://profile/42' # dispatched through Linking (react-navigation deep links)
- takeScreenshot: 'home-screen'
- takeScreenshot: { path: 'home.png', withFrame: true } # peach: framed export
- dumpTree: 5 # peach extension: dump tree to depth

Conditionals, lifecycle hooks, workspace mode, and ${...} JS-expression interpolation are supported: when: { visible / notVisible / platform / true }, optional: true, label:, onFlowStart / onFlowComplete, and a config.yaml workspace with flows: globs, includeTags / excludeTags and executionOrder.

launchApp.arguments accepts a JSON object. It is installed before guest app entry and is available through react-native-launch-arguments and NativeModules.SettingsManager.settings. Each later launch replaces it or clears it when arguments is absent. stopApp leaves the guest stopped until launchApp or openLink creates the next runtime.

Partial support

  • +
    clearKeychain: clears the iOS simulator’s React Native Keychain and Expo SecureStore credentials.
  • +
    when.platform: the Maestro runner reports iOS.
  • +
    openLink: dispatched into the app through Linking emulation (deep links work); there is no OS-level Safari fallback.
  • +
    env: seeded from your full shell environment, so ${PEACH_*} and the like resolve. A bare ${NAME} that is undefined fails the step loudly rather than substituting "undefined".

Not implemented

These throw an “unsupported” error: faker and startRecording / stopRecording (use the --record flag instead).

These behave as Maestro does on an iOS simulator: setLocation and travel move the device location, killApp stops the app as stopApp does, setAirplaneMode and toggleAirplaneMode log that the simulator has no airplane mode and continue, and inputRandomText, inputRandomNumber, inputRandomEmail and the other inputRandom* steps type a generated value.