xcresult_get_ui_hierarchy
Extract UI hierarchy from .xcresult files for Xcode tests, providing raw accessibility trees or JSON formats tailored for AI processing.
Instructions
Get UI hierarchy attachment from test. Returns raw accessibility tree (best for AI), slim AI-readable JSON (default), or full JSON.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
full_hierarchy | No | Set to true to get the full hierarchy (several MB). Default is false for AI-readable slim version. | |
raw_format | No | Set to true to get the raw accessibility tree text (most AI-friendly). Default is false for JSON format. | |
test_id | Yes | Test ID or index number to get UI hierarchy for | |
timestamp | No | Optional timestamp in seconds to find the closest UI snapshot. If not provided, uses the first available UI snapshot. | |
xcresult_path | Yes | Absolute path to the .xcresult file |