-2

Hi I run a hybrid app in real device & emulator it doesn't ask runtime permissions in android. But in AWS Device Farm it asks permission. I cant find elements for Permission dialog. Can anyone help for this?

2 Answers2

0

If you run your tests on a device that already had the app installed and already accept the permissions they will not get re-prompted, on AWS Device Farm it is a clean install and therefor will not have any permissions pre-accepted. The tests will have to be written in a way to expect the popups and accept them.

PS. This behavior only occurs on android 6.0 and above, 5.1 and bellow will accept permissions on install. See

0

I am working on that now in appium. I found the Id to be

com.android.packageinstaller:id/permission_allow_button

Using the appium inspector. Here is the rest of the code.

https://github.com/jamesknowsbest/sample-appium-test-to-dismiss-popups/blob/master/src/main/java/com/jamesknowsbest/www/SampleTest.java

jmp
  • 2,175
  • 2
  • 17
  • 16