uiautomator元素定位
时间: 2023-08-30 07:11:34 浏览: 96
UIAutomator元素定位是Android系统原生支持的定位方式,通过使用android自带的android uiautomator的类库去查找元素。它比其他定位方式更加灵活且支持元素的全部属性定位。在Appium中,也是基于UIAutomator进行封装的。使用方法find_element_by_android_uiautomator()可以运用UIAutomator元素定位。定位方法包括id定位、text定位和class name定位。此外,UIAutomator还支持递归地搜索元素,是一种强有力的定位方式。在Appium中,可以通过实例化一个UiSelector对象并通过实例接口调用来定位元素。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Appium学习18:Uiautomator元素定位](https://blog.csdn.net/up1292/article/details/104192339)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [Appium元素定位方式之android_uiautomator定位](https://blog.csdn.net/weixin_44740756/article/details/120175915)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文