appium手势运行报错AttributeError: 'int' object has no attribute 'id'

 

 原理的代码

    def touch_long_press(self, x0, y0, t0):  # 长按
        return TouchAction(self.driver).long_press(x0, y0, t0)

 

self.touch_long_press(beginx, beginy, 3000).perform().release()

修改如下:

    def touch_long_press(self, x0, y0, t0):  # 长按
        return TouchAction(self.driver).long_press(x=x0, y=y0, duration=t0)

增加了赋值的x后就正常了

相关文章:

  • 2022-01-07
  • 2021-09-02
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
  • 2021-09-08
  • 2021-12-17
  • 2021-08-29
猜你喜欢
  • 2021-05-24
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
相关资源
相似解决方案