[Android] ScrollView does not properly handle testID
property
#46180
Labels
Component: ScrollView
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Platform: Android
Android applications.
Resolution: Fixed
A PR that fixes this issue has been merged.
Description
The
ScrollView
component does not properly map thetestID
to Android'sresource-id
as expected. This issue was reported here and marked as resolved but it is still reproducible in React Native v0.74.5. There are some other issues that mention a similar problem, but none of those specifically mention theScrollView
.This issue makes it significantly harder to create end-to-end tests while still respecting accessibility. The only "workarounds" I have found involve updating the
accessibilityLabel
which is not an acceptable solution as this will impact screen reader behavior.Similar Issues:
Steps to reproduce
npm install
npm run android
appium
Alternatively, you can create your own project from scratch and simply create a
ScrollView
with atestID
prop to see the issue.React Native Version
0.74.5
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/Thenlie/scroll-view-test-id-demo/tree/main
Screenshots and Videos
The text was updated successfully, but these errors were encountered: