AccessibilitySnapshot
Captures every window's accessibility tree as AccessibilityElements in one pass.
Use it to query a whole screen quickly, including Compose UI, other apps, and system dialogs, then act on the result with UiAutomator. The returned list is in depth-first order.
Functions
Link copied to clipboard
fun capture(packageName: String? = null, maxDepth: Int = DEFAULT_MAX_DEPTH, uiAutomation: UiAutomation = InstrumentationRegistry.getInstrumentation().uiAutomation): List<AccessibilityElement>
Reads the current accessibility trees.