0

I am using Appium java-client with testNG to develop the functional test suite for android app.

To deal with system pop up which asking permission: "Allow XXXXX to access photos, media, and files on your device?" I use the class:

  import io.appium.java_client.FindsByAndroidUIAutomator

  driver.findElementByAndroidUIAutomator("text(\"ALLOW\")").click();

which works fine when I run my test locally(the other, like grant access when setting desiredCapabilities doesn't work). But when running on the device, it doesn't work, does anybody knows why? or is there any other way I could click the "ALLOW" or just grant the permission?

Shubham Jain
  • 16,610
  • 15
  • 78
  • 125
black zeng
  • 135
  • 1
  • 13

1 Answers1

0

By default, Appium on AWS Device Farm auto accepts popups. If you wish to handle your own popup detection you can set autoAcceptAlerts to false in your test capabilities.

Scott