### Install AXe using Homebrew Tap Source: https://github.com/cameroncooke/axe/blob/main/README.md Tap the repository and install the axe CLI tool using Homebrew. ```bash brew tap cameroncooke/axe brew install axe ``` -------------------------------- ### File Steps Example Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/batch-reference.md Illustrates reading commands from a file using the `--file` flag. This is suitable for complex or reusable command sequences. ```text # login flow tap --id EmailField type 'cam@example.com' key 43 type 'super-secret' key 40 ``` ```bash axe batch --udid SIMULATOR_UDID --file login.steps ``` -------------------------------- ### Install AXe with a Single Command Source: https://github.com/cameroncooke/axe/blob/main/README.md Install the axe CLI tool directly using a single Homebrew command. ```bash brew install cameroncooke/axe/axe ``` -------------------------------- ### AXe Batch Command Examples Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Examples of AXe batch commands for UI description and screenshot verification. Ensure the `--udid` flag is included for simulator interactions. ```bash axe describe-ui --udid ``` ```bash axe describe-ui --point --udid ``` ```bash axe screenshot --udid --output post-state.png ``` -------------------------------- ### Describe UI at Point Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to get a description of the UI element at a specific coordinate on the simulator. Ensure the simulator UDID is specified. ```bash axe describe-ui --point --udid ``` -------------------------------- ### Describe UI Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to get a description of the current UI hierarchy on the simulator. Ensure the simulator UDID is specified. ```bash axe describe-ui --udid ``` -------------------------------- ### Stdin Steps Example Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/batch-reference.md Shows how to pipe commands from standard input to `axe batch` using the `--stdin` flag. This is useful for dynamic command generation. ```bash cat <<'EOF' | axe batch --udid SIMULATOR_UDID --stdin tap --id EmailField type 'cam@example.com' key 43 type 'super-secret' key 40 EOF ``` -------------------------------- ### Explicit Timing and Policy Example Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/batch-reference.md Demonstrates configuring advanced batch execution policies, including cache behavior, submission types, and error handling. ```bash axe batch --udid SIMULATOR_UDID \ --ax-cache perStep \ --type-submission chunked \ --type-chunk-size 150 \ --continue-on-error \ --step "tap --label Settings" \ --step "sleep 0.5" \ --step "tap --id SaveButton" ``` -------------------------------- ### Verify AXe CLI Installation Source: https://github.com/cameroncooke/axe/blob/main/README.md Check if the axe CLI is installed and accessible by running its help command or listing simulators. ```bash axe --help axe list-simulators ``` -------------------------------- ### Inline Steps Example Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/batch-reference.md Demonstrates using the `--step` flag to define multiple commands inline within a single `axe batch` command. ```bash axe batch --udid SIMULATOR_UDID \ --step "tap --id EmailField" \ --step "type 'cam@example.com'" \ --step "key 43" \ --step "type 'super-secret'" \ --step "key 40" ``` -------------------------------- ### Toggling a Setting Switch Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/batch-reference.md Provides an example of tapping a UI element that functions as a switch or toggle. It also explains how AXe handles taps on such controls and alternative tapping methods. ```bash axe batch --udid SIMULATOR_UDID \ --step "tap --label 'Weather Alerts'" ``` -------------------------------- ### Tap Specific Label Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Example of tapping an element with the specific label 'Weather Alerts'. Ensure the simulator UDID is specified. ```bash axe tap --label 'Weather Alerts' --udid ``` -------------------------------- ### Get Booted Simulator UDID Source: https://github.com/cameroncooke/axe/blob/main/README.md Use the 'list-simulators' command to find the UDID of a currently booted simulator. This UDID is required for subsequent commands. ```bash # Find a booted simulator UDID axe list-simulators export UDID= ``` -------------------------------- ### Swipe on Simulator Screen Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Simulates a swipe gesture on the simulator screen. Define the swipe by start and end coordinates. Options include specifying duration, delta, and timing delays for pre- and post-swipe actions. ```bash nave swipe --start-x 100 --start-y 300 --end-x 300 --end-y 100 --udid # With duration and delta ave swipe --start-x 50 --start-y 500 --end-x 350 --end-y 500 --duration 2.0 --delta 25 --udid # With timing ave swipe --start-x 100 --start-y 300 --end-x 300 --end-y 100 --pre-delay 1.0 --post-delay 0.5 --udid ``` -------------------------------- ### Perform Low-Level Drag Gesture Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Emits a low-level HID touch event sequence for a drag gesture, starting from a specified point and ending at another. You can control the duration and the number of steps for the drag. ```bash nave drag --start-x 100 --start-y 400 --end-x 300 --end-y 400 --udid ave drag --start-x 100 --start-y 400 --end-x 300 --end-y 400 --duration 0.4 --steps 40 --udid ``` -------------------------------- ### Record Video with Options Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Record video from the device screen with specified frames per second, output file, and quality settings. ```bash axe record-video --udid --fps 15 --output recording.mp4 ave record-video --udid --fps 10 --quality 60 --scale 0.5 --output low-bw.mp4 ``` -------------------------------- ### List Available Simulators Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/SKILL.md Use this command to identify the UDID of the simulator you want to interact with. This is a prerequisite for most simulator-interaction commands. ```bash axe list-simulators ``` -------------------------------- ### Describe Simulator UI Source: https://github.com/cameroncooke/axe/blob/main/README.md Inspect the current user interface of a specified simulator by its UDID. ```bash # Inspect the current UI axe describe-ui --udid "$UDID" ``` -------------------------------- ### Tap UI Element by Label Source: https://github.com/cameroncooke/axe/blob/main/README.md Simulate a tap on a UI element identified by its label within the specified simulator. ```bash # Interact with the simulator axe tap --label "Continue" --udid "$UDID" ``` -------------------------------- ### Take Screenshot of Simulator Source: https://github.com/cameroncooke/axe/blob/main/README.md Capture a screenshot of the current simulator screen and save it to a specified output file. ```bash axe screenshot --output ./screen.png --udid "$UDID" ``` -------------------------------- ### Input Text into Simulator Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Enters text into the simulator. Text can be provided inline, piped from stdin (recommended for automation and special characters), or read from a file. ```bash # Inline (use single quotes) ave type 'Hello World!' --udid # From stdin (best for automation / special characters) echo "Complex text with any characters!" | axe type --stdin --udid # From file ave type --file input.txt --udid ``` -------------------------------- ### Execute Batch Workflows (From Stdin) Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Provide batch workflow steps via standard input using a heredoc. This is useful for complex or sensitive commands. ```bash # From stdin cat <<'EOF' | axe batch --udid --stdin tap --id SearchField type 'hello world' key 40 EOF ``` -------------------------------- ### Take Screenshot Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to capture a screenshot of the simulator and save it to a file. Ensure the simulator UDID is specified. ```bash axe screenshot --udid --output screenshot.png ``` -------------------------------- ### Multi-Screen Flow with Element Waiting Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/batch-reference.md Shows how to configure `axe batch` to wait for specific elements to appear before proceeding, useful for multi-screen flows. ```bash axe batch --udid SIMULATOR_UDID \ --wait-timeout 5 \ --step "tap --id LoginButton" \ --step "tap --id WelcomeMessage" ``` -------------------------------- ### Execute Gesture Presets Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Utilizes predefined gesture presets for common actions like scrolling in different directions or swiping from screen edges. Custom screen dimensions, duration, delta, and timing can be applied. ```bash nave gesture scroll-up --udid ave gesture scroll-down --udid ave gesture scroll-left --udid ave gesture scroll-right --udid ave gesture swipe-from-left-edge --udid ave gesture swipe-from-right-edge --udid ave gesture swipe-from-top-edge --udid ave gesture swipe-from-bottom-edge --udid # With custom screen dimensions ave gesture scroll-up --screen-width 430 --screen-height 932 --udid # With custom duration/delta ave gesture scroll-up --duration 2.0 --delta 100 --udid # With timing ave gesture scroll-down --pre-delay 1.0 --post-delay 0.5 --udid ``` -------------------------------- ### Execute Batch Workflows (From File) Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Execute a batch workflow by specifying a file containing the steps. Ensure the file is correctly formatted. ```bash # From file ave batch --udid --file steps.txt ``` -------------------------------- ### Tap at Coordinates with Physical Style Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to tap at specific coordinates with a physical touch-down/up style. Ensure the simulator UDID is specified. ```bash axe tap -x -y --tap-style physical --udid ``` -------------------------------- ### Type Text into Simulator Source: https://github.com/cameroncooke/axe/blob/main/README.md Input text into the active text field of the specified simulator. ```bash axe type 'Hello world' --udid "$UDID" ``` -------------------------------- ### Execute Batch Workflows with Options Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Run batch workflows with advanced options for error handling, caching, and tap styles. Configure behavior for complex scenarios. ```bash # With options ave batch --udid \ --continue-on-error \ --ax-cache perStep \ --type-submission chunked \ --type-chunk-size 150 \ --tap-style automatic \ --step "tap --label Settings" \ --step "sleep 0.5" \ --step "tap --id SaveButton" ``` -------------------------------- ### Simulate Hardware Button Presses Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Execute commands to simulate pressing hardware buttons on a device. Specify the device UDID for targeting. ```bash axe button home --udid ave button lock --udid ave button lock --duration 3.0 --udid # Long press ave button side-button --udid ave button siri --udid ave button apple-pay --udid ``` -------------------------------- ### Capture Screenshot (Auto-named) Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Take a screenshot of the device screen. The file will be automatically named and saved. ```bash axe screenshot --udid # Auto-named ``` -------------------------------- ### Tap Element by Label Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to tap an element identified by its accessibility label. Ensure the simulator UDID is specified. ```bash axe tap --label --udid ``` -------------------------------- ### Stream Video (FFmpeg Integration) Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Stream video from the device and pipe it to FFmpeg for real-time processing or conversion into formats like MP4. ```bash axe stream-video --udid --fps 30 --format ffmpeg | \ ffmpeg -f image2pipe -framerate 30 -i - -c:v libx264 -preset ultrafast output.mp4 ``` -------------------------------- ### Tap at Coordinates Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to tap at specific coordinates using the default tap style. Ensure the simulator UDID is specified. ```bash axe tap -x -y --udid ``` -------------------------------- ### Execute Batch Workflows with Element Waiting Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Configure batch workflows to wait for specific elements to appear before proceeding. Useful for dynamic UIs. ```bash # With element waiting (polls for elements that appear after navigation) ave batch --udid \ --wait-timeout 5 \ --step "tap --id LoginButton" \ --step "tap --id WelcomeMessage" ``` -------------------------------- ### Type Text Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to type specified text into the active input field on the simulator. Ensure the simulator UDID is specified. ```bash axe type 'text' --udid ``` -------------------------------- ### Perform Low-Level Touch Events Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Simulates low-level touch events, including touch down, touch up, or a combination to perform a tap or a long press. Timing can be controlled with a delay parameter. ```bash nave touch -x 150 -y 250 --down --udid # Touch down only ave touch -x 150 -y 250 --up --udid # Touch up only ave touch -x 150 -y 250 --down --up --udid # Tap ave touch -x 150 -y 250 --down --up --delay 1.0 --udid # Long press ``` -------------------------------- ### Capture Screenshot (Specific File) Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Save a screenshot to a specific file path. Ensure the output directory exists. ```bash axe screenshot --output ~/Desktop/shot.png --udid # Specific file ``` -------------------------------- ### Tap Element by ID Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to tap an element identified by its unique ID. Ensure the simulator UDID is specified. ```bash axe tap --id --udid ``` -------------------------------- ### Execute Batch Workflows (Inline Steps) Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Run a sequence of commands defined inline for a batch workflow. Use shell escaping for arguments. ```bash # Inline steps ave batch --udid \ --step "tap --id SearchField" \ --step "type 'hello world'" \ --step "key 40" ``` -------------------------------- ### Inspect UI Hierarchy Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Describe the UI hierarchy of the entire screen or a specific point. Useful for debugging accessibility issues. ```bash axe describe-ui --udid # Full screen ave describe-ui --point 100,200 --udid # Specific point ``` -------------------------------- ### Describe UI with Axe CLI Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/SKILL.md Use `axe describe-ui` to inspect the accessibility tree of the UI. This command can target a specific point or the entire UI. Ensure the `--udid` flag is included. ```bash axe describe-ui --udid ``` ```bash axe describe-ui --point --udid ``` -------------------------------- ### Take Screenshot with Axe CLI Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/SKILL.md Use `axe screenshot` to capture the current UI state. This is useful for visual verification or debugging. Always include the `--udid` flag. ```bash axe screenshot --udid --output post-state.png ``` -------------------------------- ### Capture Screenshot (Directory) Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Save a screenshot to a specified directory. The file will be automatically named within that directory. ```bash axe screenshot --output ~/Desktop/ --udid # Directory (auto-named) ``` -------------------------------- ### Stream Video (MJPEG Format) Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Stream video from the device in MJPEG format to a file. This format is suitable for direct saving or basic processing. ```bash axe stream-video --udid --fps 10 --format mjpeg > stream.mjpeg ``` -------------------------------- ### Simulate Keyboard Key Presses Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Simulates keyboard input by pressing single keys using HID keycodes, executing sequences of keycodes, or performing key combinations (modifier + key). Timing and duration can be specified for key presses. ```bash # Single key press by HID keycode ave key 40 --udid # Enter ave key 42 --duration 1.0 --udid # Hold Backspace # Key sequence ave key-sequence --keycodes 11,8,15,15,18 --udid # "hello" ave key-sequence --keycodes 40,40,40 --delay 0.5 --udid # Key combo (modifier + key, atomic) ave key-combo --modifiers 227 --key 4 --udid # Cmd+A ave key-combo --modifiers 227 --key 6 --udid # Cmd+C ave key-combo --modifiers 227 --key 25 --udid # Cmd+V ave key-combo --modifiers 227,225 --key 4 --udid # Cmd+Shift+A ``` -------------------------------- ### Tap on Simulator Screen Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Simulates a tap action on the simulator screen. You can specify the tap location by coordinates (x, y), accessibility identifier (preferred for reliability), or accessibility label. The tap style can also be set to 'simulator' or 'physical'. ```bash # By coordinates ave tap -x 100 -y 200 --udid # By accessibility identifier (preferred) ave tap --id "SearchField" --udid # By accessibility label ave tap --label "Safari" --udid ave tap --label "Weather Alerts" --udid # Auto physical touch for switches/toggles ave tap --label "Submit" --tap-style simulator --udid ave tap -x 320 -y 780 --tap-style physical --udid # With timing ave tap -x 100 -y 200 --pre-delay 1.0 --post-delay 0.5 --udid ``` -------------------------------- ### Perform Drag Gesture Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to perform a drag gesture between two specified coordinates on the simulator. Ensure the simulator UDID is specified. ```bash axe drag --start-x --start-y --end-x --end-y --udid ``` -------------------------------- ### Toggle Setting Switch by Label in Batch Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Use a batch command to toggle a UI switch element identified by its label. This simplifies interaction with toggles. ```bash # Toggle a setting switch by label ave batch --udid \ --step "tap --label 'Weather Alerts'" ``` -------------------------------- ### Set Slider Value by Label Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to set a slider's value using its label and specifying the element type as Slider. The value should be between 0 and 100. Ensure the simulator UDID is specified. ```bash axe slider --label --value 40 --element-type Slider --udid ``` -------------------------------- ### Set Slider Value by ID Source: https://github.com/cameroncooke/axe/blob/main/Sources/AXe/Resources/skills/axe/SKILL.md Use this command to set a slider's value using its ID. The value should be between 0 and 100. Ensure the simulator UDID is specified. ```bash axe slider --id --value 75 --udid ``` -------------------------------- ### Control Simulator Slider Source: https://github.com/cameroncooke/axe/blob/main/Skills/CLI/axe/references/cli-quick-reference.md Adjusts the value of a slider element within the simulator. The value is a percentage from 0 to 100. You can target the slider by its accessibility identifier or label, and optionally specify its element type. ```bash # Value is a percentage from 0 to 100 ave slider --id "volume-slider" --value 75 --udid ave slider --label "Volume" --value 40 --element-type Slider --udid ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.