Android 版本升级后,一些手机安装和 启动 app 时需要权限申请,如 MIUI Flyme,
安装权限,根据手机的不同,关闭 usb 安装验证即可
启动时就要申请权限的,在 Capabilities 已经提供了方法
可以处理安装时、 启动时 权限弹框点不到的问题 包括打开应用后一些弹框也可以处理
红米 Note5 Android8.1 上验证过,

autoGrantPermissions (Android Only)
Have Appium automatically determine
which permissions your app requires and grant them to the app on install.
Defaults to false

autoAcceptAlerts (iOS Only)
Accept all iOS alerts automatically if they pop up.
This includes privacy access permission alerts (e.g., location, contacts, photos).
Default is false.
Does not work on XCUITest-based tests.

autoDismissAlerts(iOS Only)
Dismiss all iOS alerts automatically if they pop up.
This includes privacy access permission alerts (e.g., location, contacts, photos).
Default is false.
Does not work on XCUITest-based tests.

[https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md]


↙↙↙阅读原文可查看相关链接,并与作者交流