asddasd

导航

airtest 自动滑动屏幕

# -*- encoding=utf8 -*-
__author__ = "Administrator"

from airtest.core.api import *

auto_setup(__file__)

from poco.drivers.android.uiautomation import AndroidUiautomationPoco
import random

dev = connect_device("Android://127.0.0.1:5037/AVY9KA9611412715") 
while 1:
poco = AndroidUiautomationPoco(dev)
poco.swipe([0.5, 0.7], [0.5, 0.1]) 
poco.click([0.186,0.567])
t = random.randint(1, 10)
sleep(t)

 

 

posted on 2020-11-04 13:00  asddasd  阅读(312)  评论(0编辑  收藏  举报