UIAutomator做自动化测试

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/mo_feng_/article/details/79281700

缺测试,你懂的,自己做自动化测,我用的是AndroidStudio3.0.1。
一、创建空项目
二、接入UIAutomator
在mudel中接入:

//引入Uiautomator
    androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'

三、借用别人的栗子

四、错误

java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission

没开权限导致的
这里写图片描述

猜你喜欢

转载自blog.csdn.net/mo_feng_/article/details/79281700