Android Firebase: Robo Script Failing On Location Permissions Dialog
My recorded Firebase Robo scripts fail due to system dialogs such as the "For a better experience, turn on device location" dialog.
When recording the script, it shows:
Requested permissions
android.permissions.ACCESS_FINE_LOCATION android.permissions.ACCESS_COARSE_LOCATION
but it does not record me clicking "OK" in the related permissions dialog or in the "Turn on device location" dialog.
The scripts work if I remove code that requires permissions, but as that functionality is integral to my app, removing the code which relies on location greatly reduces the usefulness of the scripts.
I would expect that the Robo script would either capture the option which I selected from the permissions dialog OR that the test runner would automatically handle accepting the permission. There must be some way to get past this or many apps could not be thoroughly tested
Similar question from 2017 with no answer: RoboScript not able click Enable Location OK button in Firebase Testlab
How do I make the scripts not break when these sorts of dialogs are triggered?
Answer
Clicking "OK" in permission request dialogs is not intended to be recorded as part of a Roboscript. Instead, Roboscript records that these permissions were requested, which it did as expected in your recording session. At replay time, Robo is supposed to grant all these permissions at the beginning of the crawl such that these dialogs do not pop up during the crawl. Apparently, these permissions were not granted as expected and these dialogs popped up breaking the execution of the recorded Roboscript. For further diagnosis, please follow Tony's suggestions. Thanks!
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View