flowdeck ui simulator to run automation commands.
What It Does
Use UI automation to:- Capture screenshots and accessibility trees.
- Tap elements, type text, and navigate flows.
- Wait for UI state changes and assert UI conditions.
When to Use It
- Smoke tests for critical flows.
- Scripted demos or QA checks.
- AI-driven interaction loops that need consistent UI state.
Quick Start
Performance and Reliability Tips
- Prefer accessibility identifiers and use
--by-idfor taps, finds, and assertions (fastest and most reliable). - For automation loops, start a session and read
latest-tree.json/latest.jpgfrom disk instead of callingscreenevery step. - Use
flowdeck ui simulator screen --tree --jsonwhen you only need a one-off structure snapshot; use--optimizeif you need a one-off screenshot. - Avoid full screenshots between every action; use
find/waitfor state checks instead. - For agent loops, run
flowdeck ui simulator session startto capture tree + screenshots in the background and read from./.flowdeck/automation/sessions/<session-short-id>/(uselatest.json,latest.jpg, andlatest-tree.jsonto find the newest capture). Starting a session stops any active session first and requires a booted simulator. session startoutputs the current screen size in points (console) and includes ascreenobject in JSON.- Sessions only write new entries when the tree or screenshot changes; screenshots are stored as JPEG at 50% quality to reduce size. Retention defaults to 60s and always keeps at least one capture. The JSON output includes full paths for the session directory, screens, trees, and latest pointers.
- Coordinate geometry is points only. Session screenshots are normalized to point size so image coordinates map 1:1 to points.
- Do not scale by @2x/@3x or device resolution; use the image coordinates directly.
- Coordinate taps use the provided point exactly; use label/ID taps to target element centers.
screenoutput sizes are reported in points; JSON includespoint_width/point_heightandpixel_width/pixel_heightwhen available.- For off-screen elements, use
scroll --until "id:yourElement"before tapping. scroll --distanceuses a fraction of the screen (0.05–0.95), not pixels or points. Example:--distance 0.25.- Tune speed vs stability with
FLOWDECK_HID_STABILIZATION_MSand typing speed withFLOWDECK_TYPE_DELAY_MS.
