Closed ravindraguptacapgemini closed 3 weeks ago
@cortinico can you please check on this issue once, suggest if there is any quick workaround.
can you please check on this issue once, suggest if there is any quick workaround.
I believe this is a bug, and sadly I don't have any quick workaround
@cortinico please provide a path to look for the possible issue, I will try to fix it myself.
@cortinico I am ready to contribute here, can you please give me a hint of area to look for possible bug.
@cortinico found out that now with new architecture, the testID is mapped to accessibilityIdentifier of a native component, previously it was being mapped to accessibilityLabel, that's why the Appium was not able find the element (with accessibility-id).
We were used to passed testID for iOS and accessibilityLabel for android but now have to used both for iOS, as:
export default function getAutomationID(automationID) {
return Platform.OS === 'ios' ? { testID: automationID, accessibilityLabel: automationID } : { accessibilityLabel: automationID };
}
After all we have issue with multiple views in hierarchy specifying the same accessibilityLabel as in the screenshot:
@ravindraguptacapgemini @cortinico Here is another issue that I have observed after fabric enablement. For some of the icons, the name/accessibility id has changed to special characters. Attaching screenshots for reference.
Before fabric enablement -
After fabric enablement -
@cortinico Just checking if you got some time to check this? We are getting these issues throughout the application after the fabric upgrade. In addition to these issues, after setting the accessibility label we were able to find out the elements but the element's text is returning the accessibility id itself.
driver.find_element(:accessibility_id, 'urlField').text
Instead of "https://" we are getting "urlField"
@cortinico Do we have some update on this issue?
@cortinico Do we have some update on this issue?
Nope I'm sorry
@cortinico We have seen the child components are being arranged as siblings in the Dom hierarchy, does it has something to do with View Flattening or it's a bug in react native new architecture?
@cortinico Do we have some update on this issue?
Nope I'm sorry
Are you checking on these issues related to accessibility and end-to-end test, because there are lots of issues regarding locating elements. I know we are going to get major release 0.73, but can you please target to fix this issue in the coming releases?
Related Issues https://github.com/facebook/react-native/issues/43648
This is probably fixed by:
Need to be cross checked in 0.75 and eventually closed.
I've reproduced this and confirmed it's a New Architecture specific issue. Fix on the way.
Description
Recently after migrating to new architecture we are facing issue in locating TextInput in the automation test cases. Specifically we are not able to read the text value and the length of text of a TextInput element in Appium test cases.
What exactly happening here is that with new architecture is setting the specified testID to TextInput's direct parent view (refer screenshot - New Architecture - Value available on child of element with specified testID.png) instead of setting it directly to the TextInput (as it works in old architecture, screenshot - Old Architecture.png).
React Native Version
0.72.3
Output of
npx react-native info
System: OS: macOS 13.4.1 CPU: (12) arm64 Apple M2 Pro Memory: 936.34 MB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 16.20.0 path: /usr/local/bin/node Yarn: version: 1.22.19 path: /opt/homebrew/bin/yarn npm: version: 8.19.4 path: /usr/local/bin/npm Watchman: version: 2023.06.26.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /Users/ravindragupta/.rbenv/shims/pod SDKs: iOS SDK: Platforms:
Steps to reproduce
Add testId for TextInput and try to read text value from the element in automation test case (i.e. Appium)
Snack, code example, screenshot, or link to a repository
Reproducer App Link: https://github.com/ravindraguptacapgemini/reproducer-react-native-maps-events/tree/layout-animation-issue