core/commands/native_tap/ios_simulator_accessibility library

Parsing and matching for the iOS simulator accessibility tree that the Swift helper's describe subcommand prints, used by fdb native-tap --text on the iOS simulator.

Pure functions only: no process calls, so it is unit-testable without a simulator.

Classes

IosAxElement
One accessibility element, in depth-first order.
IosAxFrame
A rectangle in points in the current interface orientation.
IosAxInvalid
IosAxMatch
An element that matched a label, and where to tap it.
IosAxParse
Outcome of parseIosSimulatorAccessibility.
IosAxParsed
IosAxSnapshot
The tree the helper read.

Functions

findIosAxMatches(IosAxSnapshot snapshot, String query) → List<IosAxMatch>
Finds the elements matching query, in screen-reader order, in the first tier that has any match (the same tiers as Android):
iosAxLabelsWithoutFrames(IosAxSnapshot snapshot) → bool
True when elements carry labels but none has a frame the helper could map to the screen, so nothing can be tapped by label.
iosAxVisibleLabels(IosAxSnapshot snapshot) → List<String>
Distinct non-empty labels of on-screen elements, in order, each on one line. Tells the caller what was on screen when nothing matched.
parseIosSimulatorAccessibility(String raw) → IosAxParse
Parses the JSON the helper's describe subcommand prints.