1环境搭建
在python中下载pip install Appium-Python-Client Windows中配置java的环境变量,adb的环境变量
2 :Appium基本讲解
四个基本启动参数 platforName 型号 Android/Ios deviceName 配对名 appPackage 包名 appActivity 启动项 查询当前应用程序的包名和启动项 adb shell dumpsys window w |findstr \/ |findstr name=
3: uiautomatorviewer
如何使用: 1.进入SDK目录下的tools目录,打开uiautomatorviewer 2.电脑连接真机或打开android模拟器 3.启动待测试app 4.点击uiautomatorviewer的左上角Device Screenshot,会生成app当前页面的UI控件截图 5.选择截图上需要查看的控件,即可浏览该控件的id,class,text,坐标等信息
4: App元素定位API
常见的3中定位方式 id id属性值 class class属性值 xpath xpath表达式 WebDriverWait 显示等待操作 使用案例: WebDriverWait(d