【发布时间】:2016-09-12 13:17:36
【问题描述】:
我的应用是设备管理员,我通过运行启用它
Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN);
然后按“激活”或“启用”。
我可以使用 Espresso 从我的测试 APK 中启用设备管理员吗?
【问题讨论】:
-
可能不是通过 Espresso,但 UI Automator 应该可以工作,因为您正在做的实际上是一个集成测试。
-
@CommonsWare,UI Automator 帮助了我。我希望我可以分享代码。这是一个商业项目。如果您发布答案,我会接受它
标签: android android-espresso device-admin