目录
前言
- WEditor,支持Android和iOS元素的查看;编辑器能够提供辅助编写脚本,查看组件信息,调试代码等功能。
安装
依赖python 3.6 +
-
pip3 install -U weditor
启动
-
启动:weditor (启动后窗口不能关掉)
-
创建快捷方式:weditor --shortcut (限Windows)
-
说明:如果浏览器没有自动打开,可以手动访问 http://localhost:17310
连接手机
连接android手机
- adb devices 获取手机设备号
- 点击Connect,出现绿叶正常连接成功
- 点击Dump Hierarchy获取页面元素
连接iPhone手机
- 启动WDA:tidevice xctest -B com.xxx.WebDriverAgentRunner.xctrunner
- 转发请求到手机:tidevice relay 8100 8100
查看页面元素
- iPhone和Android页面元素
代码调试
-
text = d.xpath(
'//*[@text="1元抵618元"]').text
-
-
print(text)
转载:https://blog.csdn.net/IT_heima/article/details/117402496
查看评论