flow_recording_replace_step
Replace one step of an in-progress recording (before flow_recording_save) with a freshly-captured action, without changing its position. Performs the action live on the device — same as flow_recording_action — then overwrites the step at stepIndex instead of appending. Use this to fix a mis-recorded step (wrong element bound, wrong action) in place rather than deleting + re-recording + reordering. Replacing the appLaunch step (index 1) is rejected. Accepts the same action params as flow_recording_action.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X coordinate (tap/doubleTap/longPress/swipe start; assert target element) | |
| y | No | Y coordinate (tap/doubleTap/longPress/swipe start; assert target element) | |
| toX | No | Swipe end X | |
| toY | No | Swipe end Y | |
| text | No | Text to type (sendKeys) | |
| action | Yes | Action type to record in place of the existing step | |
| waitMs | No | Wait duration ms (for wait action) | |
| keyCode | No | Android keycode (keyPress, e.g. 3=HOME, 4=BACK) | |
| keyName | No | Hardware button name for pressButton. Required when action=pressButton. | |
| expected | No | Expected value (required for textEquals and textContains assertions). | |
| attribute | No | Attribute to read for text assertions. iOS: label, value, name. Android: text, content-desc, resource-id. | |
| stepIndex | Yes | 1-based index of the step to replace | |
| assertType | No | Assertion type (required when action=assert). | |
| durationMs | No | Swipe/longPress duration ms (default 300) | |
| recordingId | Yes | Recording ID from flow_recording_start |