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后就正常了

posted @ 2021-03-04 18:26  yimu-yimu  阅读(853)  评论(0编辑  收藏  举报