-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
fix: add an empty AccessibilityNodeInfo creation for future androidx.test.uiautomator:uiautomator:2.3.0 update #589
Conversation
…x.test.uiautomator:uiautomator:2.3.0 update
app/src/main/java/io/appium/uiautomator2/model/internal/CustomUiDevice.java
Outdated
Show resolved
Hide resolved
I will create another PR later to avoid passing nullable selectors |
…tor2-server into fix-for-uia-2-3-0
Thanks > selector |
// } | ||
AccessibilityNodeInfo accessibilityNodeInfo = | ||
(node == null && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) | ||
? new AccessibilityNodeInfo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed cd5692b
I used AS's config so it added these spaces automatically. I guess we could modify config file etc?
## [5.15.3](v5.15.2...v5.15.3) (2023-12-31) ### Bug Fixes * add an empty AccessibilityNodeInfo creation for future androidx.test.uiautomator:uiautomator:2.3.0 update ([#589](#589)) ([182d338](182d338))
🎉 This PR is included in version 5.15.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Investigating appium/appium#19597
According to the androidx.test.uiautomator:uiautomator:2.3.0 beta01, UiObject2's constructor has changed as below, thus we must pass an empty
AccessibilityNodeInfo
instance asnode
instead ofnull
.In addition to the node,
selector
has also been changed toNonNull
in some places in the UiObject2 file. We should pass properselector
for the 2.3.0 update, but such change will be large, thus I have updated onlyAccessibilityNodeInfo
which is pretty safe as a PR here.(I haven't investigated about the
selector
thing yet)I have tested this code with an Android 11 real device. This code affects
click
for example as below code. It worked without issuesAn error with
androidx.test.uiautomator:uiautomator:2.3.0
withnull
node whenclick
occurred.