【问题标题】:Karate Mobile test framework throwing error when do click option [duplicate]空手道移动测试框架在单击选项时抛出错误[重复]
【发布时间】:2021-06-21 21:25:02
【问题描述】:

功能文件

Scenario: Validate My Contacts page
    Given driver { webDriverSession: { desiredCapabilities : "#(android.desiredConfig)"} }
    Then click("//*[@text='My Contacts']")
    ...
    ...

例外

{message=An element could not be located on the page using the given search parameters (id='%5B%5D')}

问题排查

  1. click() 函数调用 elementFind api 并返回 HTTP 200
  2. 然后用elementID调用elementClick api,返回HTTP 500
  3. 注意到elementClick api 没有有效的elementID

技术栈

Appium Studio v21 空手道 1.0.0(0.9.6 中存在问题)

请分享您解决问题的指导点。

【问题讨论】:

    标签: mobile automation appium karate


    【解决方案1】:

    我不确定appium studio 如何与空手道配合使用,但建议使用通过npm 安装的appium。此外,请确保您拥有最新版本的 Appium 或至少高于 1.9 的版本(他们似乎开始支持 w3c 规范)

    还可以尝试将您的空手道版本升级到1.1.0.RC1

    如果您仍然遇到问题,请关注https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue 并帮助我们重现。

    【讨论】:

    • 我也使用了延迟。我在 karate-core.jar v1.0.0 中进行了调试,发现每个方法首先在 doc 中找到元素并执行操作。在我的情况下,成功找到元素并且该元素 id 没有传递给调用、输入等操作 api。请帮助我
    猜你喜欢
    • 2020-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多