appium-python-元素定位,,appium继承了s
appium-python-元素定位,,appium继承了s
appium继承了selenium的所有元素定位方式(web端),并有自己的元素定位方式
# id
driver.find_element_by_id("cn.TuHu.android:id/productslist_text")
# class
driver.find_element_by_class_name("android.widget.TextView")
# xpath
driver.find_element_by_xpath("//android.widget.TextView[@text=‘空调养护‘]")
driver.find_element_by_xpath("//android.widget.TextView[@recource-id=‘cn.TuHu.android:id/productslist_text‘
# uiautomator
# UiSelector()为java函数
loc = ‘new UiSelector().text("空调养护")‘
driver.find_element_by_android_uiautomator(loc)
# 组合定位
loc = ‘new UiSelector().text("空调养护").recource-id("cn.TuHu.android:id/productslist_text")‘
driver.find_element_by_android_uiautomator(loc)
appium-python-元素定位
相关内容
- Linux下载Python并运行Django,,Linux下载安装P
- Python 面试题 字符串 删除多少个字符使得出现做多的字
- python3-开发进阶Django中序列化以及rest_framework的序列化,
- [转]Installing python 2.7 on centos 6.3. Follow this sequence exactl
- 如何在python列表中查找某个元素的索引,,如何在pytho
- python 继承机制,,继承机制经常用于创建
- Python学习笔记(五)函数式编程-高阶函数,,高阶函数
- python 格式化输出,,# 格式化输出:fo
- Python包含以下方法:,,Python包含以下
- Python学习1-起点,,准备开始学习Pyth
评论关闭