appium-andriod自动化实现注意项

注意项:

1.appium需要全局安装,否则run test case 报错“appium not installed”

2.启动appium命令 

node /Applications/Appium.app/Contents/Resources/node_modules/appium/build/lib/main.js

3.adb 自动push待测试apk到手机端失败

/data/local/tmp/b2d2916bb5388e1dc281ec3e71ef1234.apk: No such file or directory,解决方案是手动执行命令“adb push xxx.apk  /data/local/tmp/b2d2916bb5388e1dc281ec3e71ef1234.apk”

 

4.Screen did not unlock successfully

解决方案参考:https://github.com/appium/appium-android-driver/blob/master/docs/UNLOCK.md,如下指定

Using the unlock with UIAutomation capabilities:

{

  "unlockType": "pin",
  "unlockKey": "1111"
}

 

 

原文地址:https://www.cnblogs.com/danqiu/p/7637911.html