flow_recording_action
Perform and record one action step on the device. Performs the action and records it with automatic page source + element capture. Coordinates are in video / iOS-automation space — use flow_recording_start's windowSize as the reference.
Actions:
tap / doubleTap / longPress / swipe — gesture actions (require x,y; swipe also needs toX,toY)
sendKeys — type text into the focused field
keyPress — press an Android keycode (e.g. 3=HOME, 4=BACK)
wait — pause for waitMs milliseconds
pressButton — press a hardware button by name ('home', 'volumeUp', 'volumeDown', 'lock'). Performed live on the device during recording. Android maps to hardware keycodes; iOS invokes the native hardware-button command.
assert — record a UI assertion check (no device gesture). Identifies the target element at (x,y), then at replay time verifies the assertion condition. Assertion failures mark the step as FAILED and surface the mismatch in errorMessage. Makes the recording a real verifiable test.
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 | |
| 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 (e.g. 'home', 'volumeUp', 'volumeDown', 'lock'). 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. Defaults to platform primary text attribute when omitted. | |
| assertType | No | Assertion type (required when action=assert). exists/notExists check element presence; textEquals/textContains compare an attribute value. | |
| durationMs | No | Swipe/longPress duration ms (default 300) | |
| recordingId | Yes | Recording ID from flow_recording_start |