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

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

上一篇:【NOIP2017】小凯的疑惑


下一篇:点到直线方程的距离、垂足、对称点