简体   繁体   English

AWS Device Farm - Android 仪器测试的权限

[英]AWS Device Farm - permissions for Android Instrumented test

Is it possible to grant secured permission for espresso instumented test in AWS device farm?是否可以为 AWS 设备场中的 espresso 仪器测试授予安全权限? I need to grant "android.permission.ACCESS_BACKGROUND_LOCATION", in Android 10 and above it's secured and can be granted only in the system settings for the app.我需要在 Android 10 及更高版本中授予“android.permission.ACCESS_BACKGROUND_LOCATION”,它是安全的,只能在应用程序的系统设置中授予。

You can grant secured permission for espresso instumented test within custom YML File using below sample commands in pre_test phase您可以在 pre_test 阶段使用以下示例命令在自定义 YML 文件中为 espresso 仪器测试授予安全权限

# These next lines set the permissions of the app
- adb shell pm grant io.appium.settings android.permission.ACCESS_COARSE_LOCATION
- adb shell pm grant io.appium.settings android.permission.ACCESS_FINE_LOCATION
- adb shell pm grant io.appium.settings android.permission.CHANGE_CONFIGURATION
- adb shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000
- adb shell appops set io.appium.settings android:mock_location allow

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在AWS设备场上的Android Instrumentation Test中设置设备方向 - Set device orientation in Android Instrumentation Test on AWS device farm AWS Device Farm-将参数传递给Robotium测试脚本-Android - AWS Device Farm - Pass parameters to a Robotium Test Script - Android RuntimeException:在AWS设备场上运行检测测试时无法启动活动 - RuntimeException: Could not launch activity when running instrumented tests on AWS device farm 在AWS Device Farm中针对android espresso的每次测试运行后如何清除设备数据 - how to clear device's data after each test run for android espresso in aws device farm 在AWS Device Farm上运行Appium Android TestNG - Running Appium Android TestNG on AWS Device Farm 从Android Studio Gradle构建为AWS Device Farm生成UIAutomator测试JAR - Generate UIAutomator Test JAR for AWS Device Farm from Android Studio Gradle build 由于 AWS Device Farm 中的测试包解析错误,Android 测试被跳过 - Android Tests skipped due to test package parsing error in AWS Device Farm AWS Device Farm + Espresso:在AWS Device Farm中运行涉及本机JNI方法调用的Espresso Instrumentation测试 - AWS Device Farm + Espresso: Running Espresso Instrumentation Test involving Native JNI method call in AWS Device Farm Android检测的单元测试将无法在一个物理设备上运行 - Android instrumented unit test will not run on one physical device 运行Calabash测试后,AWS Device Farm“未找到要执行的套件” - AWS Device Farm “No suites found to execute” after running Calabash test
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM