我应该如何处理要求允许或拒绝移动自动化选项的基于摄像头的弹出窗口?
How should I handle the camera based popups which asks for allow or deny options for mobile automation?
我想处理这些弹出窗口并在测试 运行 时允许。我应该设置什么功能来允许测试 运行 而无需与这些弹出窗口交互。
如果您使用的是最新的 Android 测试库,则可以使用 GrantPermissionRule
来授予权限。
您可以像这样使用它:
@Rule public GrantPermissionRule grantPermission = GrantPermissionRule.grant(Manifest.permission.CAMERA);
我通过以下方式设置了功能
autoGrantPermissions: true
让我允许弹出窗口。
我想处理这些弹出窗口并在测试 运行 时允许。我应该设置什么功能来允许测试 运行 而无需与这些弹出窗口交互。
如果您使用的是最新的 Android 测试库,则可以使用 GrantPermissionRule
来授予权限。
您可以像这样使用它:
@Rule public GrantPermissionRule grantPermission = GrantPermissionRule.grant(Manifest.permission.CAMERA);
我通过以下方式设置了功能
autoGrantPermissions: true
让我允许弹出窗口。