/axiom:ui
Drive and validate the iOS simulator UI and accessibility with xcui (plus AXe and simctl).
Command
bash
/axiom:uiWhat It Does
Guides you through scriptable simulator UI and accessibility testing:
- Preflights the environment with
xcui doctor— confirms AXe is installed (offersxcui doctor --installif missing) and a simulator is booted - Drives input via
xcui–xcui tap --id <id>(a physical touch),xcui type,xcui swipe, which forward to AXe - Synchronizes with
xcui wait–--for-element <id>instead of sleeping or re-screenshotting - Asserts on the accessibility tree –
xcui assert --id <id> --label "…" --trait button --single(exit 1 on failure) - Sets accessibility state –
xcui a11y set --toggle <name> --value on --app <bundle-id>, then re-asserts
When to Use
- Validating UI behavior on the simulator without a human driving it
- Tapping by accessibility identifier rather than fragile pixel coordinates
- Waiting for an element or app-idle instead of guessing with
sleep - Running accessibility checks live — Dynamic Type, Increase Contrast, Reduce Motion, Reduce Transparency — and asserting the result
Usage Tips
xcuiauto-resolves the booted simulator when exactly one is booted; with more, it refuses to run without--udidand lists the booted devices- Output is JSON by default; add
--humanfor prose - Exit codes:
0pass ·1assertion-fail/timeout ·2environment error - A tap reports success whether or not anything happened, so confirm the result with
xcui waitorxcui assert - Calling
axe tapdirectly? Add--tap-style physical— AXe's default tap style is ignored by SwiftUI buttons, list rows, menus, and tabs
Related
- xcui Reference – full tool documentation, subcommand flags, and the verified accessibility toggles
- simulator-tester – the agent that drives
xcuilive for test scenarios and accessibility validation - AXe (Simulator Automation) – the input/tree engine
xcuibuilds on - /axiom:test-simulator – scenario setup (location, push, deep links);
/axiom:uiowns interaction, assertion, and accessibility config