UI Tests with react native. How to fix Timestamped Event Matching Error: Failed to find matching element
For anyone else looking for an answer for this - I found that Touchable elements in RN have an issue with the UI tests side of things.
If you set accessible={false} on the Touchable, then the testID works on the child Text & View elements when recording.
<TouchableOpacity onPress={onPressFn} accessible={false}> <View style={styles.buttonContainer} testID="button"> <Text style={styles.buttonText}> {children} </Text> </View></TouchableOpacity>