Appium元素定位工具

本文介绍了AndroidSDK自带的UIAutomatorView定位工具,AppiumDesktopInspector,以及Uiautomator2Python库(Weditor)的安装过程。特别提到了在使用Weditor时遇到的metadata-generation-failed错误及其解决方案——降低安装版本到0.6。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.1 UIAutomatorView Android SDK自带的定位工具


位置:Android SDK/tools/uiautomatorviewer.bat

元素常见几个属性:
text

resoureid:

class:元素标签


content-desc:元素功能描述


1.2 Appium Desktop Inspector

appium server自带的定位工具


1.3 Weditor

Uiautomator2 python第三方库 appUi自动化测试框架

安装:
命令01:cmd:pip install Uiautomator2

命令02:cmd:python-m uiautomator2 init

命令03:cmd:pip install weditor

确认按装:cmd:wedito-help

如果出现报错如下:

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

解决方法:降低安装版本:pip install weditor==0.6.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值