首页 > 编程知识 正文

appium自动化测试教程,剑姬自动w脚本后续处理

时间:2023-05-03 16:09:20 阅读:129848 作者:4355

项目地址: https://github.com/Alibaba/we B- editor

在基本信息之前进行APP自动化测试时使用了Appium Inspector

WEditor是一个显示基于python的APP元素的工具,提供脚本编写、元素识别和代码调试等功能。

环境生成安装$pip3installweditor运行$weditor运行后,http://localhost:17310/#将自动打开

首页安卓获取设备uuid(base ) Zhongxin :~Zhongxin $ adbdeviceslistofdevicesattachedfuro7TBI4ly 56 d 59 device 172.28.59.119

找到要连接和放置元素的元素并单击

例如,我们需要定位“外来记录”

单击元素后,右侧会显示其定位

XPathLite//*[@text='门诊记录' ]代码生成双击“门诊记录”可以看到自动生成了代码

# coding 3360 utf-8 # importuiautomator2ASU 2d=U2.connect () d.XPath )/*[@text='外来记录') () click ) )代码中的

代码调试IOS首先安装ti设备

MAC:https://blog.csdn.net/dou _ being/article/details/120401626

windows:https://blog.csdn.net/dou _ being/article/details/120401944

如果您没有在自动iOS设备上运行过,则必须首先检查设备上是否安装了名为WebDriverAgent的APP。 如果未安装,可以使用以下两种方法进行安装:

只要将iOS设备连接到一个Mac,用xcode编译并安装源代码,成功安装WebDriverAgent,就可以脱离Mac

使用tidevice安装命令在iOS设备上安装已重新签署开发人员证书的WebDriverAgent.ipa。

查看手机APP (base ) Zhongxin :~Zhongxin $ tideviceapplistcom.Tencent.xinw echat8.0. 16 com.Zhongxin.webdriveragentent - (企业)4.4.6com.lvxian.doctor微医)4.4.6com.happy elements.1 OS animal快乐消乐1.101.180 com.GD dnm.gua huhume 启动screenshot.picsew滚动屏幕1.0.23me.clarityAPP壁纸7.2.3coom .7.1com.lvxian.guahao微医4.4.6wda在app列表中

tidevicewdaproxy-bcom.Zhongxin.webdriveragentrunner 490336534.xct runner---- port 8200为http://localhost 3:8200/statatt

! 测试(/users/Zhongxin/library/application support/typo ra-user-images/image-2021129174954095.png ) )

连接到手机,然后单击Dump Hieraerchy

连接和操作手机元件的同安卓

要素定位代码生成、代码调试代码部分需要wda

导入wdad=wda.client (http://localhost :8200 ) d.XPath )/*[@label='健康记录器' click ) )代码

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。