Refer below article for complete guidance,
https://medium.com/@shamique/test-automation-in-react-native-ac9ac2330ab9
- Run
npm install - Generate Android and iOS project -
react-native eject - Start the project -
react-native start - Run the project -
react-native run-android
Note: If you get an error like 'error Invalid regular expression:', apply this fix: https://stackoverflow.com/questions/58120990/how-to-resolve-the-error-on-react-native-start and re-run the above steps
cd test_project- Run
npm install - Setup the WebdriverIO config file
- Run
npx wdio ./wdio.conf.js