4

My recorded Firebase Robo scripts fail due to system dialogs such as the "For a better experience, turn on device location" dialog.

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?

Nissi
  • 205
  • 3
  • 13
  • I would suggest you to ask this question on the Firebase Community Slack, in channel #test-lab. Developers there will be able to look at the specific tests that are failing. You can also file a support case through https://firebase.google.com/support. – Tony Kai Jie Ren Aug 02 '19 at 17:46
  • Thank you. I was unaware of that group - I will try it out – Nissi Aug 05 '19 at 14:18

1 Answers1

0

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!

  • By the way, which API level did you record your Roboscript on and which API level in Firebase Test Lab did you replay the recorded Roboscript on that showed the permission request dialogs? – Stanislav Negara Aug 02 '19 at 18:15
  • 28 for recording; 26, 27, and 28 for running. Also tried both physical and virtual devices for running. – Nissi Aug 05 '19 at 14:15
  • Thank you for the update. Given these API levels, all permissions should be granted before the crawl starts, so what you observed is a bug. Please file a corresponding bug report. Thanks! – Stanislav Negara Aug 05 '19 at 17:47
  • @StanislavNegara do you have a link to any docs that explain/confirm _"Robo is supposed to grant all these permissions at the beginning of the crawl"_ pls? – Blundell Sep 30 '20 at 10:11
  • I am not sure if we explicitly mention this in any public docs as of now, but this is the default Robo behavior. If you find any examples when this is not the case, please file a bug. Thank you! – Stanislav Negara Oct 02 '20 at 00:34