rnx do
rnx do
Grouping verb for user-interaction actions. rnx do <action> covers the write side of the bridge: taps, typing, key presses, touch/scroll/drag/swipe/pinch gestures, reload, and local timing helpers. Repeat --then before each additional batchable action to run one ordered engine batch.
Options
| flag | description |
|---|---|
--then <action> | append an action to the same ordered engine batch |
--json | for an inline chain, print every engine-step result |
--no-wait | for an inline chain, skip the final auto-settle |
Examples
Inline Action Chains
Repeat --then before each additional do action to run one ordered engine
batch:
Each phrase uses the same positional grammar as its standalone command. The
shell passes --then through as a normal argument, so punctuation in action
data remains data:
The exact --then token is reserved by rnx do as the action boundary.
Batchable phrases are tap, tap-id, tap-text, double-tap,
long-press, type, type-into, key, key-sequence, dismiss,
scroll, drag, swipe, pinch, touch, and sleep.
Conveniences such as type-into and key-sequence expand into their normal
input steps inside the same batch. Run lifecycle and state commands such as
reload, settle, and rnx wait separately.
The batch stops on the first failed action, then applies the usual post-write
auto-settle. Add --json for every engine-step result or --no-wait to
skip the final auto-settle.
Inline Versus Durable Flows
An inline chain is the shell-native form for a one-off batch. Put reusable,
reviewed, or CI-owned flows in Maestro YAML and run them with
rnx maestro test. A chain does not create or update a Maestro draft.
Subcommands
Run rnx do <verb> --help for the flags and examples of any subcommand.
targeting
| subcommand | description |
|---|---|
tap <testid> | tap a testID, absolute coords, or —testid / —text |
double-tap <testid> [gapMs] | tap the same coordinates twice quickly |
tap-text <text> [--nth <n>] [--within <testID>] | findByText then tap (rich disambiguation flags) |
tap-id <id> | findByTestId then tap center |
tap-best <query> | testID-first, text-fallback robust tap |
native device
| subcommand | description |
|---|---|
scan <text> [--format <web-format>] | inject a barcode scan into active camera scanning |
text input
| subcommand | description |
|---|---|
type <text> | type through the iOS visual keyboard |
type-into <id> <text> | focus input by testID then type |
key <name> | special key (return, delete, space, shift, …) |
key-sequence <key> [<key> ...] | press multiple visual keyboard keys |
keycode <code> [<code> ...] | press DOM-style key codes via visual keyboard |
dismiss | dismiss the iOS keyboard |
dispatch <char> | raw key (bypasses visual shift state) |
gestures
| subcommand | description |
|---|---|
scroll <id> <x> <y> | scroll a ScrollView by testID |
drag <x1> <y1> <x2> <y2> [steps] [stepMs] | drag via real PointerEvents |
swipe <x1> <y1> <x2> <y2> [steps] [stepMs] | drag with faster defaults |
long-press <testid> [durationMs] | hold a press on a testID or at coordinates |
touch <down|move|up|cancel> <x> <y> [pointerId] | low-level touch primitives |
gesture <preset> [durationMs] | preset gestures (scroll / edge swipes) |
pinch <x1> <y1> <x2> <y2> <x1'> <y1'> <x2'> <y2'> [steps] [stepMs] | two-pointer pinch helper |
animations
| subcommand | description |
|---|---|
stop-animation <id|all> | stop a running animation |
lifecycle
| subcommand | description |
|---|---|
reload | reload the page + wait for reconnect |
wait [seconds] | wait for sim reconnect |
settle [seconds] [--strict] | wait for animations to settle |
sleep [seconds] | local pause between commands |