【问题标题】:Xpath is not working,I am using appium to locate an xpathXpath 不工作,我正在使用 appium 来定位 xpath
【发布时间】:2020-01-27 08:14:58
【问题描述】:

应用本身建议的 xpath 不起作用

xpath : //[@accessibilityLabel=‘iconUncheck’ and (./preceding-sibling:: ./following-sibling::)[@id=‘Prod Test’]]

请帮助我构建 xpath。 我想点击的元素

元素的属性。

【问题讨论】:

    标签: selenium xpath appium


    【解决方案1】:

    试试下面的xpath:

    //*[@class='UIAImage' and ./following-sibling::*[@class='UIAView' and contains(text(),'Bone Marrow')]]
    

    或者

    //*[@class='UIAImage' and ./following-sibling::*[contains(text(),'Bone Marrow')]]
    

    【讨论】:

      猜你喜欢
      • 2016-12-28
      • 2014-07-27
      • 2018-03-15
      • 1970-01-01
      • 2019-07-26
      • 2019-06-09
      • 1970-01-01
      • 2015-03-05
      • 2023-01-22
      相关资源
      最近更新 更多