We are using appium for automating ReacNative Android/iOS mobile app. We are able to identify elements on Android app, but couldn’t identify elements on iOS app. In iOS whole UI screen is considered as a single element
Note:
With Same iOS app we are able to identify elements using Appium studio tool
Appium version:1.22.0
Below is the list of different steps which dev team tried on iOS app to resolve this issue.
Tried With new POC with minimum UI.
• Updated the navigation version
• Tried changing the value of snapshotMaxDepth
• Tried Appium Studio with the emulator.
• Tried using BrowserStack
• accessible= {false}
• accessibilityLable
• Tired using just simple views “”.
• Removed Animated View
• Removed ScrollView
• Removed KeyboardAwareScrollView
• Removed FlatList and Animated.FlatList
• Removed BottomSheet
• Removed createSharedElementsStackNavigator4 from navigation
• Change the UI.
• If we take the screen and place it at the first screen of the app/any navigation it was working fine.
• Changed the Bottom Stack navigation to BottomTabNavigation, but still not able to locate the elements.
• using this condition to assign the testid’s like
• • Platform.OS === “android” ? { accessible: true, accessibilityLabel: id } : { accessible: false, testID: id };
Please let me know if there is a way to resolve this.
We are able to inspect elements using appium on iOS version 11.2 , where as we are not able to inspect element on OS version above 11.2. Could you please let us know what might be the issue.
Checked with dev team and they are using Xcode version 12.4 and as per the matrix this should support iOS version 12,13 and 14. But we are not able to see elements in these OS versions too.
I am using browserstack for element identification. Moreover i have tested app against appium desktop app running on mac machine (macOS 12.01 and Xocde - 13.1)
After reviewing your comment I’m not sure we’re on the same page.
The issue is that even though we have accessibility id’s on the elements the DOM tree is not returning the element we are searching for.
We have tried increasing snapshotMaxDepth but unfortunately that doesn’t work correctly if increased above 65.
Using the Accessibility Inspector tool we are able to see the elements. Is there another tool that you are referencing when you mention xCode inspector?
We are also using the Appium Inspector tool to help identify element interactions. In that tool we are unable to see the element in the DOM tree and when hovering over elements we do not see the specific element (FAB button) as expected.
I do not use Appium inspector but use mostly page source instead.
ReactNative known as creating deep structure which cause problem. To fix it sometimes helps increase snapshotMaxDepth.
Ok perfect. So now that we are the on same page snapshotMaxDepth breaks after bumping it to 65. Can we get this issue prioritized by the appium dev team? This seems to be affecting quite a few projects using the tool.