一. Appium中使用UI Automator查找元素的方法
1. 直接使用
driver.find_element_by_android_uiautomator(UIAutomator locator)
2.
from appium.webdriver.common.mobileby import MobileBy
driver.find_element(MobileBy.ANDROID_UIAUTOMATOR, UIAutomator locator)

本文介绍了如何使用Appium结合UI Automator进行Android自动化测试。通过`driver.find_element_by_android_uiautomator`方法或者`MobileBy.ANDROID_UIAUTOMATOR`定位元素,并详细阐述了UI Automator locator的使用,包括通过index、text、clickable、content-desc、resource-id等属性查找元素,以及结合多个属性定位的方式。

2137

被折叠的 条评论
为什么被折叠?



