【问题标题】:Appium double tapAppium 双击
【发布时间】:2021-01-29 13:52:41
【问题描述】:

有人有解决Appiums action.doubleTap(element);函数性能慢的办法吗?

根据我的经验,双击动作根本不会以人类可以做到的速度双击,它只是在短时间内连续点击元素 2 次,但不会复制用户快速点击的动作一个按钮两次(甚至多次)

actions.double_tap(element)
actions.perform()

有没有其他方法可以多次点击一个比这个功能更快的元素? (Python 解决方案会很棒,但绝对任何语言都可以)

【问题讨论】:

    标签: python selenium appium ui-automation qa


    【解决方案1】:

    问题似乎很笼统,是不是你用上面的功能做不到?

    你可以试试下面的代码:

    new TouchAction(driver).press(375,450).release().perform().press(375,450).release().perform()
    

    【讨论】:

      【解决方案2】:

      我们可以使用 withTapsCount 来解决双击问题。 下面的代码对我有用。我在同一个元素上录制了 2 次。 [使用 JAVA]

      AndroidElement nextCount= driver.findElementByAndroidUIAutomator("text(\"NEXT\")");
      TouchAction touchAction = new TouchAction(driver);
      touchAction.tap(tapOptions().withElement(element(nextCount)).withTapsCount(2)).perform();
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-12-16
        • 2020-02-27
        • 1970-01-01
        • 2017-07-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-01-31
        相关资源
        最近更新 更多