AIRTEST 剑与远征 推图脚本

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

from airtest.core.api import *
from airtest.core.win.win import *
from airtest.aircv.template import *

auto_setup(__file__)
connect_device("Windows:///328782")

touch(Template(r"tpl1628178712650.png", record_pos=(-0.002, 0.541), resolution=(492, 852)))

while(1):
    if exists(Template(r"tpl1628178734543.png", record_pos=(0.004, 0.4), resolution=(492, 852))):
        touch(Template(r"tpl1628178734543.png", record_pos=(0.004, 0.4), resolution=(492, 852)))
    sleep(3)

    if exists(Template(r"tpl1628179046718.png", record_pos=(0.002, 0.683), resolution=(492, 852))):
        touch(Template(r"tpl1628179046718.png", record_pos=(0.002, 0.683), resolution=(492, 852)))
    wait(Template(r"tpl1628178875087.png", record_pos=(-0.002, -0.118), resolution=(492, 852)))
    touch(Template(r"tpl1628178875087.png", record_pos=(-0.002, -0.118), resolution=(492, 852)))
    

# 胜利
# Template(r"tpl1628179616029.png", record_pos=(-0.008, -0.114), resolution=(492, 852))







上一篇:数据中台-监测脚本


下一篇:移动端 CPU 的深度学习模型推理性能优化——NCHW44 和 Record 原理方法详解