【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

相关推荐
lifewange11 小时前
UI自动化页面元素定位有几种方式
前端·ui·自动化
运维有小邓@11 小时前
Active Directory服务账户是什么?
运维·服务器·网络
HIT_Weston12 小时前
84、【Ubuntu】【Hugo】搭建私人博客:文章目录(三)
linux·运维·ubuntu
moxiaoran575313 小时前
使用docker安装myql 8.0
运维·docker·容器
qq_54702617913 小时前
Linux 常用快捷键及文本编辑器
linux·运维·服务器
醇氧14 小时前
【Linux】 安装 Azul Zulu JDK
java·linux·运维
阿蔹16 小时前
Python-Pytest
python·自动化·pytest
ICT系统集成阿祥16 小时前
Linux运维最万能的三条指令
linux·运维·服务器
chenyuhao202417 小时前
Linux网络编程:数据链路层
linux·运维·网络
QT 小鲜肉17 小时前
【Linux命令大全】002.文件传输之uupick命令(实操篇)
linux·运维·服务器·chrome·笔记