原理的代码
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后就正常了
appium手势运行报错AttributeError: 'int' object has no attribute 'id'