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