【问题标题】:Finding xpath by using appium with selenium通过将 appium 与 selenium 一起使用来查找 xpath
【发布时间】:2015-04-19 06:37:38
【问题描述】:

我试图使用 uiautomatorviewer 为带有 appium 1.3.4.1 + selenium 2.44 版本的本机 android 应用程序找到以下代码的 xpath

这是截图,

我尝试了以下xpath来查找元素“请输入卷号..编辑。”

driver.switchTo().frame(1);
driver.findElementByXPath("//android.widget.RelativeLayout[0]/android.widget.RelativeLayout[@text='Please enter Roll No.. Editing.']").sendKeys("10001");
driver.findElementByXPath("//android.widget.RelativeLayout[@text='Please enter Roll No.. Editing.']").sendKeys("10001");

我想通过 xpath 识别文本文件并将 studentid 发送为 10001

任何建议。

【问题讨论】:

    标签: selenium-webdriver appium android-uiautomator


    【解决方案1】:

    UIAutomatorViewer 不提供 XPath。请使用 Appium Inspector 查找 XPATH。

    【讨论】:

    • Appium Inspector 无法在 Windows 中运行,而在 Mac 上运行。所以剩下的唯一选择是 UIAutomatorViewer。
    猜你喜欢
    • 2017-09-14
    • 2021-09-17
    • 2016-03-12
    • 1970-01-01
    • 1970-01-01
    • 2023-03-18
    • 1970-01-01
    • 1970-01-01
    • 2018-12-01
    相关资源
    最近更新 更多