name: ios-simulator-axe description: Interact with iOS Simulators using AXe CLI. Use when testing iOS apps, navigating UI, verifying screens, tapping buttons, or automating simulator interactions. Requires a booted simulator.
AXe is a CLI tool for automating iOS Simulators using Apple's Accessibility APIs. It allows Claude to interact with running iOS apps - reading UI elements, tapping buttons, typing text, and navigating through screens.
Trigger this skill when:
- User asks to test an iOS app in the simulator
- User wants to verify UI changes visually
- User asks to navigate through app screens
- User wants to check accessibility labels
- User asks to interact with the simulator (tap, type, swipe)
- User wants to walk through a user flow
1. Find the booted simulator:
axe list-simulators 2>/dev/null | grep -i "booted"2. Describe current screen:
axe describe-ui --udid SIMULATOR_UDID 2>&1 | grep -v "objc\["3. Extract just the labels (quick view):
axe describe-ui --udid SIMULATOR_UDID 2>&1 | grep -v "objc\[" | grep "AXLabel"List simulators:
axe list-simulators
# Output: UDID | Device Name | State | RuntimeDescribe UI (get accessibility tree):
axe describe-ui --udid UDID
# Returns JSON with all UI elements, frames, labels, typesTap at coordinates:
axe tap -x 210 -y 400 --udid UDIDTap with delay (wait before/after):
axe tap -x 210 -y 400 --pre-delay 500 --post-delay 300 --udid UDIDSwipe:
axe swipe --from-x 200 --from-y 600 --to-x 200 --to-y 200 --udid UDIDScroll presets:
axe scroll-up --udid UDID
axe scroll-down --udid UDID
axe scroll-left --udid UDID
axe scroll-right --udid UDIDEdge swipes (navigation):
axe swipe-from-left-edge --udid UDID # Back gesture
axe swipe-from-right-edge --udid UDID
axe swipe-from-top-edge --udid UDID # Control center
axe swipe-from-bottom-edge --udid UDID # Home indicatorType text:
axe type "Hello World" --udid UDIDPress specific key:
axe key 40 --udid UDID # Enter key
axe key 42 --udid UDID # Backspaceaxe button home --udid UDID
axe button lock --udid UDID
axe button siri --udid UDID# Get UDID
UDID=$(axe list-simulators 2>/dev/null | grep -i "booted" | head -1 | cut -d'|' -f1 | tr -d ' ')
# See current screen
axe describe-ui --udid $UDID 2>&1 | grep -v "objc\[" | grep "AXLabel"
# Tap a button (find coordinates from describe-ui frame data)
axe tap -x 210 -y 750 --udid $UDID
# Verify next screen
sleep 0.5 && axe describe-ui --udid $UDID 2>&1 | grep -v "objc\[" | grep "AXLabel"- Run
describe-uito get the JSON - Find the button by its
AXLabel - Use the
framecoordinates (calculate center: x + width/2, y + height/2) - Run
tapat those coordinates
Example:
{
"AXLabel": "Continue",
"frame": { "x": 30, "y": 700, "width": 360, "height": 50 }
}Tap center: axe tap -x 210 -y 725 --udid UDID
# Check all labels on screen
axe describe-ui --udid $UDID 2>&1 | grep -v "objc\[" | grep "AXLabel"
# Look for specific element
axe describe-ui --udid $UDID 2>&1 | grep -v "objc\[" | grep -i "button_name"# Tap text field (find coordinates first)
axe tap -x 200 -y 300 --udid $UDID
# Type into it
axe type "[email protected]" --udid $UDID
# Tap next field
axe tap -x 200 -y 380 --udid $UDID
# Type password
axe type "password123" --udid $UDID
# Submit
axe tap -x 200 -y 500 --udid $UDIDSuppress warnings: The tool may output objc warnings - filter them:
axe describe-ui --udid UDID 2>&1 | grep -v "objc\["Finding coordinates:
- The
framein describe-ui output gives{x, y, width, height} - Tap the center:
x + width/2,y + height/2
Timing:
- Use
sleep 0.3orsleep 0.5between actions for animations - Use
--pre-delayand--post-delayflags for precise timing
Multiple actions:
axe tap -x 100 -y 200 --udid $UDID && sleep 0.3 && axe describe-ui --udid $UDID 2>&1 | grep "AXLabel"- Only works with booted simulators (not physical devices)
- Requires accessibility to be working in the app
- Some custom UI elements may not expose accessibility info
- Coordinates are in screen points, not pixels
list-simulatorsshows at least one booted simulatordescribe-uireturns JSON with UI elementstapcommands report "completed successfully"- Navigation between screens works as expected