首页 > 移动平台 > 详细

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

时间:2021-03-04 19:09:21      阅读:48      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

 原理的代码

    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'

原文:https://www.cnblogs.com/may18/p/14482257.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!