【airtest】自动化入门教程(二)airtest操作

目录

一、touch

二、wait

三、swipe

四、exists

五、text

六、keyevent

七、snapshot

八、sleep

九、断言

[9.1 assert_exists](#9.1 assert_exists)

[9.2 assert_not_exists](#9.2 assert_not_exists)

[9.3 assert_equal](#9.3 assert_equal)

[9.4 assert_not_equal](#9.4 assert_not_equal)


前言:本文主要针对aritest部分的基础操作,aritest是一个跨平台的、基于图像识别的UI自动化测试框架,适用于游戏和App,支持平台有Windows、Android和iOS

一、touch

touch(图片) 基于图片进行点击操作

二、wait

wait(图片) 等待图片出现

等待图片对象出现,如果不出现会报错

三、swipe

swipe(v1, vector=[x,y]) 基于V1滑动到 偏移x和y的位置

从一个图片划动到另一图片, 第二张图片使用

四、exists

五、text

text() 文本输入 注意:设备要开启yosemite 输入法

六、keyevent

keyevent 键盘指令 BACK 返回 HOME

七、snapshot

八、sleep

九、断言

9.1 assert_exists

9.2 assert_not_exists

9.3 assert_equal

9.4 assert_not_equal

相关推荐
Pythonliu724 分钟前
茴香豆 + Qwen-7B-Chat-Int8
linux·运维·服务器
你疯了抱抱我26 分钟前
【RockyLinux 9.4】安装 NVIDIA 驱动,改变分辨率,避坑版本。(CentOS 系列也能用)
linux·运维·centos
小O_好好学2 小时前
CentOS 7文件系统
linux·运维·centos
哲伦贼稳妥2 小时前
一天认识一个硬件之机房地板
运维·网络·经验分享·其他
john_hjy3 小时前
11. 异步编程
运维·服务器·javascript
x晕x3 小时前
Linux dlsym符号查找疑惑分析
linux·运维·服务器
活跃的煤矿打工人3 小时前
【星海saul随笔】Ubuntu基础知识
linux·运维·ubuntu
tangdou3690986554 小时前
两种方案手把手教你多种服务器使用tinyproxy搭建http代理
运维·后端·自动化运维
北京智和信通4 小时前
云平台和虚拟化智慧运维监控,全面提升故障感知与处置能力
运维·虚拟化·云平台·虚拟机监控
fasewer4 小时前
第五章 linux实战-挖矿 二
linux·运维·服务器