Airtest IDE 自带了python3 的运行环境,但不方便扩展,如果我们想安装其他第三方依赖包,可以在本地python3 环境pip安装。
在 IDE 设置运行本地python3 环境。

设置 Airtest

选项-设置-Airtest

  • 自定义 Launcher 文件路径,这个默认一般不用改
  • 默认Log 存放路径, 运行脚本生成的log路径
  • 自定义Python.exe路径,可选择本地python3环境

Airtest IDE 自动化测试18 - 设置自定义 Python.exe 路径

自定义Python.exe路径

打开自定义Python.exe路径-选本地python3 安装的目录:E:\python36\python.exe,点OK保存。

Airtest IDE 自动化测试18 - 设置自定义 Python.exe 路径

设置python路径后,重启Airtest IDE,在编辑器写代码就可以自动补齐了。

运行脚本

运行脚本,查看log日志窗口
Airtest IDE 自动化测试18 - 设置自定义 Python.exe 路径

可以看到运行的日志

# 作者-上海悠悠 QQ交流群:717225969
# blog地址 https://www.cnblogs.com/yoyoketang/

"E:\python36\python.exe" -u "D:\soft\Airtest\AirtestIDE\sample\custom_launcher.py" "D:\airtest_code\a4.air" --log "C:\Users\dell\AppData\Local\Temp\AirtestIDE\scripts\fb0e431ec500b363a99cf53d431f4afc"

第一个命令参数是"E:\python36\python.exe",也就是前面设置的本地python路径。

相关文章:

  • 2021-09-03
  • 2021-09-28
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2021-09-26
  • 2021-07-01
  • 2021-12-22
  • 2021-06-21
  • 2022-12-23
  • 2021-07-24
相关资源
相似解决方案