使用虫师的poium 发现长按操作和下滑操作不好使
最终实现
长按:action.long_press(elem, x, y, duration).wait(3000).release().perform()
需要等待几秒再释放
file_pg.long_press(elem=file_pg.newfile_filename_id, x=1, y=2, duration=3000)
原来是action.long_press(elem, x, y, duration).perform()(实际是点击)
下滑操作:
swipe_to_refresh()在我的环境不好用
最终使用swipe 替代:
self.page.swipe(300, 300, 300, 600, 800) 相当于在垂直方向下滑一段距离和时间