I am using Firebase Robo script test now.
I found out the robo script would failed because robo script recorded the
text of button I clicked instead of the resource id.
When I want to i18n test, it would failed in other language.
Anyway to prevent this ?
By default the recorded Robo script will contain ids
, text
and contentDescriptions
of elements. When this script gets used all specified fields need to match. There are 2 ways around this:
a) Manually remove the elementDescriptors
fields from the script that you don't want to be used for matching.
b) There's an option in Android Studio that allows you to disable the recording of text
and contentDescription
fields. Go to File -> Settings -> Build, Execution, Deployment -> Espresso Test Recorder and uncheck both "Use text for element matching" and "Use content description for element matching". Afterwards re-record the Robo script. It should no longer contain text
and contentDescription
fields in the elementDescriptors
array.