Does React Native use non-native UI elements (Android)?

(Nick Grealy) #1

This is a question about how react-native builds/compiles Android mobile applications…

Does React Native use non-native UI elements (Android)?

Recently, I tried testing my application using Firebase’s robo-test, which (I’m told by Google employees) fails due to:

In the internal discussion it has been discovered that since you are using React native with non-Android native UI elements, the Test would not run as expected.

We wouldn’t be able to troubleshoot third party SDK issues from this channel.

I’m literally just using React-Native OOTB components, so… are these not native Android UI elements?

import { Text, View, TouchableOpacity } from 'react-native'

More discussion here on stackoverflow…

Firebase - Known Issues

Robo test is only compatible with apps that use UI elements from the Android UI framework (including View and ViewGroup objects, but excluding WebView objects). If you use Robo test to exercise apps that use other UI frameworks, including apps that use the Unity game engine, the test may exit without exploring beyond the first screen.

(David Perrenoud) #2

It seems that Robo test uses “resource-id” to identify the UI elements, which isn’t yet supported in React Native. You can upvote this in the React Native product pains:

In the meantime, you can use UIAutomator on Firebase instead of Robo test and write the tests by hand: