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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM