Skip to content
Compare
Choose a tag to compare

v1.1.2

@yimelia yimelia released this
41a1789
Compare
Choose a tag to compare

接口:

  • 新增了接口airtest.__version__用来查看airtest当前版本号,也可以运行命令行airtest version查看
  • log()接口目前可以更好地将报错或信息显示到报告中了
    • 在报告中显示信息,log(string_msg)
    • 在报告中显示报错,log(Exception), log(title, string_error)

报告:

  • 修复了一些新版本报告的BUG
  • 显示log.txt、步骤绝对时间,截图点击后可放大显示
  • 可自定义截图压缩精度,有以下使用方式:
    • 使用命令行启动,airtest run ... --compress quality
    • 在脚本中自定义,优先级高于命令行,取值范围是1-99的正整数,airtest默认取10,如果希望获得更高精度的图片可以改为75
    import airtest.core.api import *
    ST.SNAPSHOT_QUALITY = xxx  # [1, 99]
    
    • 设置某张图片的压缩精度,snapshot(quality=my_quality)
  • 简化了生成报告的代码,去掉了一些无需额外传入的参数,现在只需要这样写就可以了:
rpt = LogToHtml("test_bj.air", "log", export_dir="export", plugins=["poco.utils.airtest.report"])
rpt.report()

windows:

  • 修正了touch直接设置光标位置导致的部分ui未识别到光标位移的问题
  • 修正了swipe在双屏模式下会多位移一倍距离的问题
  • 修正了在某些版本的Python和pywin32下会报dll缺失的问题

Android:

  • 更新了minicap.so,对部分Android10手机进行了兼容,但是并不完全,Android10的更好兼容请参考下一个版本1.1.3
  • 更新了Yosemite.apk,修复了横屏截屏的bug,更新了录屏接口和录屏的方式,对部分手机有更好的兼容
  • 修复了部分模拟器初始化时的失败问题,现在无需勾选use ADB orientation也能连接模拟器了
  • adb的cmd操作增加了timeout参数,可以指定指令运行的超时时间了
  • 去掉了在windows下运行cmd时如果出现异常,将导致弹出"adb.exe停止响应"的弹窗,避免脚本被卡住

Interface:

  • Added interface airtest .__ version__ to view the current version of airtest. You can also run the command line airtest version to view it.
  • The log() interface can now better display errors or information in reports
    • Display information in the report, log (string_msg)
    • Show errors in the report, log (Exception), log (title, string_error)

Report:

  • Fixed some bugs reported by the new version
  • Display log.txt, step absolute time, click the screenshot to zoom in
  • You can customize the compression precision of screenshots, which can be used in the following ways:
    • Start from the command line, airtest run ... --compress quality
    • Customize in the script, the priority is higher than the command line, the value range is a positive integer from 1 to 99, the default value of airtest is 10, if you want to obtain a more accurate picture, you can change it to 75
    import airtest.core.api import *
    ST.SNAPSHOT_QUALITY = xxx  # [1, 99]
    
    • Set the compression precision of a picture, snapshot (quality = my_quality)
  • Simplified the code for generating reports, removing some parameters that do not need to be passed in, now it is only necessary to write like this:
rpt = LogToHtml("test_bj.air", "log", export_dir="export", plugins=["poco.utils.airtest.report"])
rpt.report()

Windows:

  • Fixed the problem that some UIs did not recognize the cursor displacement caused by touch directly setting the cursor position
  • Fixed an issue where swipe would double the distance in dual screen mode
  • Fixed the problem of missing dlls under certain versions of Python and pywin32

Android:

  • Updated minicap.so, compatible with some Android10 phones, but not completely. For better compatibility of Android10, please refer to the next version 1.1.3
  • Updated Yosemite.apk, fixed the bug of horizontal screen capture, updated the screen recording interface and the screen recording method, better compatibility with some mobile phones
  • Fixed the failure of some simulators during initialization, now you can connect to the simulator without checking the use ADB orientation
  • Added a timeout parameter to the cmd operation of adb, which can specify the timeout period for the instruction to run
  • Removed the "adb.exe stopped responding" pop-up window if an exception occurs when running cmd under windows, avoiding the script being stuck