0

I have a component:

        <TouchableOpacity onPress={onPress} testID={'A'}>
            <ImageBackground source={''}testID={'B'}>
                <View style={styles.bannerContent} testID={'F'}>
                    <Text testID={'C'}>Hello</Text>
                    <Text testID={'D'}>World</Text>
                    <TouchableOpacity testID={'E'} >
                        <Text>World</Text>
                    </TouchableOpacity>
                </View>
            </ImageBackground>
        </TouchableOpacity>

I'm using Katalon Studio to test it and I can see that the hierarchy of the components is as follows on iOS:

XCUIElementTypeOther - Hello World World

So, iOS is taking the ImageBackground as one component. I tried different hierarchies like putting a View as a child component of ImageBackground or TouchableOpacity but it seems like I'm not able to get to E which is the goal here.

Any ideas why this might be the case? Is this how TouchableOpacity is read in iOS when converted from react-native code?

Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116

0 Answers0