I'm using detox to test a react native app in iOS. (Detox is written on top of EarlGrey).
I prefer to use Detox's by.id matcher which uses React Native's testID (iOS's accessibility ID)
What I am having trouble with is the amount of time it takes to find the proper testIDs on each page in my app to write the test cases. Is there a way to record my user interactions so that I can quickly generate a detox test script? I'm largely in the simulator clicking on various buttons. Alternatively is there a way to quickly view testIDs in the react native app while it is running?
I have tried the following which I find very slow:
Is there a way to record my user interactions so that I can quickly generate a detox test script?
- Not as far as I know
You can try react-devtools to find testIDs.
https://github.com/facebook/react-devtools
npm i -g react-devtools
After installing run react-devtools in terminal.
react-devtools
You still need to Toggle Inspector, but you will now be able to use React Developer Tools UI to explore React DOM tree like this: