Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: investigate "newer" AccessibilityNodeInfo's possibility in uia2 or espresso #19560

Open
KazuCocoa opened this issue Dec 20, 2023 · 1 comment
Labels

Comments

@KazuCocoa
Copy link
Member

KazuCocoa commented Dec 20, 2023

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Context: #15138 (comment)

I found that https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/package-summary#(androidx.compose.ui.semantics.SemanticsPropertyReceiver).testTag() addressed:

For newer AccessibilityNodeInfo-based integration test frameworks, it can be matched in the extras with key "androidx.compose.ui.semantics.testTag"
For legacy AccessibilityNodeInfo-based integration tests, it's optionally exposed as the resource id if testTagsAsResourceId is true (for matching with 'By.res' in UIAutomator).

Current UIA2 driver/server depends on https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo , so it is the "legacy" one. I wondered if the "newer" one was androidx.view.accessibility.AccessibilityNodeInfoCompat in https://developer.android.com/reference/androidx/core/view/accessibility/package-summary.

For example, extras in UIA2 had androidx.view.accessibility.AccessibilityNodeInfoCompat.SPANS_START_KEY=[]. It had androidx.view.accessibility.AccessibilityNodeInfoCompat, thus at least, https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat was a relevant library from the composer.

https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeProviderCompat has a method named createAccessibilityNodeInfo to return AccessibilityNodeInfoCompat thus it is potentially the "newer" accessibility node info...?

Then, can we use the andriodx's accessibility package for uia2 driver/server? For example like espresso server's compose/espresso, the uia2 also can switch them with legacy and new. The new is for compose based application.

Describe the solution you'd like

I don't have any idea right now if the above is achievable/correct, just found the above description when I dug into #15138 (comment) for hetpack compose.

This may not work possibly

@KazuCocoa KazuCocoa added the Enhancement feature label Dec 20, 2023
@KazuCocoa
Copy link
Member Author

https://github.com/chromium/chromium/blob/main/docs/accessibility/browser/android.md

AccessibilityNodeInfo
AccessibilityNodeInfoCompat

These would help to catch up with them, I guess. I haven't read well yet.

Arunscape added a commit to Arunscape/swiper that referenced this issue Jan 10, 2024
I suspect that's why there are no content description elements to use in
the layout in this app (because it's likely using jetpack compose)

appium/appium#19560
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant