Airtest Python跨平台UI自动化框架

Airtest简介

Airtest,是Python第三方的跨平台的UI自动化框架,基于图像识别原理,可用于游戏和App的开发,支持的平台包括Windows、Android和iOS等。

Airtest应用实例

from airtest.core.api import *

# 通过ADB连接本地Android设备
init_device("Android")
# 或者使用connect_device函数
# connect_device("Android:///")
connect_device("Android:///")
install("path/to/your/apk")
start_app("package_name_of_your_apk")
touch(Template("image_of_a_button.png"))
swipe(Template("slide_start.png"), Template("slide_end.png"))
assert_exists(Template("success.png"))
keyevent("BACK")
home()
uninstall("package_name_of_your_apk")

Airtest Github统计数据

Apache-2.0 license

Github 7.6k stars

Airtest安装命令

pip install -U airtest

Python版本要求

Python2.7 & Python3.3+

免责声明:内容编辑自网络,仅供参考,不保证正确性,不作任何决策依据!!以上数据皆截止于博文的写稿日期。


行业导航 / Python指南 :
























Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.