【发布时间】:2018-02-02 11:11:15
【问题描述】:
我想识别第三个元素 TextView:Completed 线性布局
使用第 5 个线性布局中的元素 TextView:Ashraf Mulla。
我在 xpaths 下尝试过,但它无法识别 COMPLETED 元素。
Xpath 1 : "//android.widget.TextView[@text='Ashraf Mulla']/../preceding-sibling::android.widget.LinearLayout/android.widget.TextView[@text='COMPLETED']"
Xpath 2: "//android.widget.TextView[@text='COMPLETED']/../following-sibling::android.widget.LinearLayout/android.widget.TextView[@text='Ashraf 穆拉']"
请帮忙。
【问题讨论】:
-
提供xml文件的例子
标签: selenium xpath appium android-uiautomator