appium-andriod自动化实现注意项

眼前多少难甘事,自古男儿当自强。这篇文章主要讲述appium-andriod自动化实现注意项相关的知识,希望能为你提供帮助。
注意项:
1.appium需要全局安装,否则run test case 报错“appium not installed”
2.启动appium命令 
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 14.0px "PingFang SC"; color: #222527 } span.s1 { }node /Applications/Appium.app/Contents/Resources/node_modules/appium/build/lib/main.js
3.adb 自动push待测试apk到手机端失败
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 12.0px "Songti SC"; color: #222527 } span.s1 { }【appium-andriod自动化实现注意项】/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" }

 
 

    推荐阅读