移动端自动化测试 python appium Android

来源:互联网 发布:mac app store出错 编辑:程序博客网 时间:2024/04/30 01:01

http://blog.csdn.net/sasoritattoo/article/details/17579739

Android自动化测试UiAutomator

UiSelector对象

ele = self.driver.find_element_by_android_uiautomator('new UiSelector().className("android.widget.ListView").childSelector(new UiSelector().className("android.widget.LinearLayout").index(%s).childSelector(new UiSelector().className("android.widget.CheckBox")))'%i)


by_xpath

elems = self.driver.find_elements_by_xpath(
            "//android.widget.ListView/android.widget.RelativeLayout/android.widget.TextView[contains(@resource-id, 'file_name')]")

0 0
原创粉丝点击