【问题标题】:How to find element with Android uiautomator?如何使用 Android uiautomator 查找元素?
【发布时间】:2018-11-19 20:28:04
【问题描述】:

我正在使用带有 Python 和 Appium 的 android uiautomator。我有以下元素,我需要找到一种方法来点击它。该元素没有唯一的 resourceId、className 或文本。

The image of the element

The elements details on the uiautomator

【问题讨论】:

标签: android python appium android-uiautomator


【解决方案1】:

使用Appium-Inspector获取按钮的xPath,然后通过xPath定位按钮:

btn1 = self.driver.find_element_by_xpath("xpath-here")

【讨论】:

    猜你喜欢
    • 2015-05-03
    • 1970-01-01
    • 2019-10-06
    • 2015-08-06
    • 1970-01-01
    • 2019-07-04
    • 2018-02-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多