xcresult_get_ui_hierarchy
Extract UI hierarchy from Xcode test results (.xcresult) by specifying test ID. Returns raw accessibility tree, slim AI-readable JSON, or full JSON with optional timestamp.
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 |
|---|---|---|---|
| xcresult_path | Yes | Absolute path to the .xcresult file | |
| 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. | |
| 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. |