from com.android.monkeyrunner import MonkeyRunner, MonkeyDevicedevice = MonkeyRunner.waitForConnection()#获取连接的设备device.wake()#唤醒屏幕MonkeyRunner.sleep(1)device.drag((400,500),(400,100),0.1,10)#上划解锁MonkeyRunner.sleep(1)device.startActivity(component='com.ss.android.ugc.aweme/.main.MainActivity')#打开抖音appMonkeyRunner.sleep(1)print("connected")#无限循环每隔10秒自动刷下一个视频while True: device.drag((400,500),(400,100),0.1,10) MonkeyRunner.sleep(10) print("again") pass