Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
odhub ui-tree <udid>to inspect the accessibility tree of the foreground iOS app on a booted simulator. The output includes element attributes and coordinates that can be passed directly toodhub tap.This enables scripts and automation tools to discover controls by their labels or identifiers before interacting with them.
Usage
Print the complete tree with indentation:
Show only elements with a label, title, identifier, or value:
Export the complete tree as JSON, with frames in guest points:
Text output includes normalized tap coordinates:
Tap that control with:
Implementation
accessibilityTree(_:)toSimulatorAdapter, returning a Codable element tree containing roles, role descriptions, labels, titles, identifiers, values, frames, and children.AccessibilityPlatformTranslationframework dynamically and bridges its requests to the guest through CoreSimulator.tap.Validation
scripts/build.shpassed.The simulator remained booted during validation.