Using this JSX:
<View>
<Text testID='t1'>text 1</Text>
<Text testID='t2'>text 2</Text>
</View>
I can find children by theirs testID
(e.g. with Appium)
If I change View
to a TouchableOpacity
, then the children seem to come together in one UIAElement
on iOS and then cannot be found.
It seems to TouchableOpacity
have the hardcoded property available to true, and this allows the crash behavior (see https://code.facebook.com/posts/435862739941212/making-react-native-apps-accessible/ )
Is this the expected behavior? This makes testing difficult.
source
share