获取apppackage
通过cmd命令,前提是先打开手机中你要获取包名的APP
-
adb shell
-
dumpsys activity | grep mFocusedActivity
-
adb 链接模拟器端口
adb connect 127.0.0.1:21503 (逍遥模拟器的端口)
获取设备名称
adb devices -l
遇到adb 链接时常断开 原因是有其它软件冲突 如: 火绒
逍遥模拟器链接不上参考:https://blog.csdn.net/qq_43572758/article/details/104162888
appium 的 触控api 参考:http://appium.io/docs/cn/writing-running-appium/touch-actions/
图片对比参考:https://www.cnblogs.com/1234abcdttttjy001/archive/2019/03/13/10522502.html
报错:
AttributeError: 'int' object has no attribute 'id'
解决参考:https://blog.csdn.net/JimmyAndRushking/article/details/86595667