【问题标题】:How to identify the elements(Buttons, text fields) using UIAutomaterview for appium?如何使用 UIAutomaterview for appium 识别元素(按钮、文本字段)?
【发布时间】:2015-12-04 07:46:01
【问题描述】:

我在 Windows 7 64 位中打开了 UIautomatorview。我试图识别已经在模拟器设备中打开的元素(登录)按钮。我可以拍摄该页面的快照,但是当我尝试检查登录按钮时,它没有显示 UIautomatorview 工具的左侧面板。它仅显示无法检查特定元素的框架级事物。有人可以指导我怎么做吗? else 我是不是做错了什么?

【问题讨论】:

    标签: android-emulator appium ui-automation


    【解决方案1】:

    您可以使用类和文本属性生成 XPath。 假设类名是android.widget.Button 和 Text 属性值为 = 4 比 Xpath 会如下:

    xpath("//android.widget.Button[@text='4']")
    

    【讨论】:

    • 感谢您的快速回复。问题在这里我无法检查 chrome 浏览器中的任何元素。它只显示地址栏。当我尝试检查按钮和文本框时,左侧面板中没有显示任何内容。显然无法检查它们。
    猜你喜欢
    • 1970-01-01
    • 2018-04-12
    • 2014-11-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-21
    • 2015-08-17
    • 2019-11-03
    相关资源
    最近更新 更多