2

It is super annoying when a popup appears asking for permissions while the tests are running, and it also makes the test very unstable and unreliable. On Android, we can use autoGrantPermissions, but I couldn't find anything for iOS XCUITest framework. Using XPath to locate the popup is also an option, but it still makes the test pass sometimes and fail the others, which is not reliable.

Tedxxxx
  • 238
  • 3
  • 19

2 Answers2

0

Since Appium started to use WebDriverAgent/XCUITest for iOS automation, autoAcceptAlerts is no longer working simply because it is not implemented on agent side.

You can read reasoning in the related ticket

So the only way is to use alert API, e.g. wait for it and accept/dismiss:

driver.switchTo().alert().accept();
dmle
  • 3,498
  • 1
  • 14
  • 22
0

Using appium 1.22.3 with inspector and webdriveragent and XCUITEST . I was able to use

autoAcceptAlerts: true

which is similar to androids "autograntpermission" and it works fine on my machine.

mr. Luvji
  • 30
  • 4