tv_goto
Press a direction repeatedly until focus reaches a target element defined by text, CSS selector, or testid. Automatically handles edges and loops, so you don't have to guess the number of presses.
Instructions
Press a direction repeatedly until the FOCUSED element matches a target (text / CSS selector / testid). Bounded by maxSteps, a deadline, and two structural stops: focus that stopped moving (edge of a list) and focus that wrapped around to a position already visited. Use this instead of guessing "press DOWN 7 times".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Stop when the focused element's text contains this (case-insensitive). | |
| device | No | Device id from devices.json. Omit to use the default device. | |
| testid | No | Stop when the focused element has this data-testid / data-export-id. | |
| maxSteps | No | Maximum presses (default 30). | |
| selector | No | Stop when the focused element matches this CSS selector. | |
| direction | Yes | Direction to travel in. | |
| deadlineMs | No | Wall-clock budget (default 45000). |