![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Airtest
文章平均质量分 82
小丸子加油哇
这个作者很懒,什么都没留下…
展开
-
airtest 不同目录下导入air文件方法
前言:目录结构如下,在setup.air文件中引用commonUtil.air文件中的方法1、方法1:绝对路径引入:from airtest.core.api import usingsys.path.append(r'D:\\JD\\stockAirtest\\common\\commonUtil.air')using("commonUtil.air")from commonUtil import *2、方法2:相对路径引入:using("../common/commonUtil.air原创 2020-06-17 15:37:21 · 1544 阅读 · 0 评论 -
Airtest自定义启动器添加air脚本
官方文档:http://airtest.netease.com/docs/cn/5_airtest_framework/3_launcherpy.html?highlight=setup使用using方法添加air脚本using("setup.air")from setup import *启动器方法:from airtest.cli.runner import AirtestCase, run_scriptfrom argparse import *import airtest.r.原创 2020-06-11 09:43:19 · 574 阅读 · 0 评论 -
Airtest 在设备安装app
安装app,先检测是否安装,如果已安装,先卸载再安装,如果未安装,直接安装dev = device()dev.check_app("com.tf.stock")因为check_app()成功返回true,失败抛出异常,所以在检测没有的情况下,需要捕获异常,直接安装#检测是否已经安装app,并重新安装app方法 def installapp(): try: dev.check_app("appPackageName") dev.uninstall_ap.原创 2020-06-05 15:38:41 · 2660 阅读 · 1 评论 -
Windows安装Airtest命令行运行环境
Airtest相关Windows安装Airtest命令行运行环境安装python环境。执行python --version命令,查看是否安装成功进入本地python3.7\Scripts目录依次执行命令: pip install airtest pip install pocoui在国内执行pip命令,下载文件很容易超时,如果超时的话,可以添加镜像执行命令:pip install airtest-i http://pypi.douban.com/simple原创 2020-06-04 15:36:31 · 850 阅读 · 6 评论