I have added a test id to my button:
return (
<TouchableOpacity onPress={onPress} {...TestIdHelper(testID)}>
<View style={[styles.iconButton, buttonStyles]}>
<View style={styles.mainContentContainer}>
{icon && icon}
<Text style={[styles.iconButtonText, textStyles]}>{text}</Text>
</View>
{!!subText && <Text style={styles.iconButtonSubText}>{subText}</Text>}
</View>
</TouchableOpacity>
);
When I try and inspect the element in Appium Inspector, I see nested elements with the name as the content, and no testId’s. How can I add testId’s?
Here is a screenshot of my inspector: https://ibb.co/vZYxLcv