Skip to content

v1.2.5 - v1.2.6

Compare
Choose a tag to compare
@yimelia yimelia released this 29 Apr 07:39
· 219 commits to master since this release

Airtest 1.2.5 - 1.2.6

Add 新增

  • iOS投屏速度优化,新增MJPEG模式,以更高的速度查看iOS屏幕画面
  • iOS点击速度优化,请配合更新iOS-Tagent到最新版本(如果原先使用了Appium/WebDriverAgent项目的,可以替换成我们这个版本),更新之后可以极大降低点击延迟
  • 请使用最新版本的AirtestIDE 1.2.14,可以体验到最佳效果,否则可能导致点击位置错误的问题
  • 如果使用了Poco,请更新至1.0.87版本,否则可能导致点击位置错误的问题

相关注意事项:

  1. 极少部分设备上,可能点击位置会有偏移,目前在AirtestIDE上无法修正鼠标点击的偏移,但是可以在代码中修复,例如:

    我们测试到一台iPhone 7Plus手机,在点击时有坐标偏移的现象,因此通过如下方式在运行代码时可以修正:

    >>> device = connect_device("iOS:///")
    >>> device.touch((100, 100))  # wrong position
    >>> print(device.touch_factor)
    0.333333
    >>> device.touch_factor = 1 / 3.3  # default is 1/3
    >>> device.touch((100, 100))
    

    关于touch_factor的解释:

    touch_factor这个值用于换算iOS设备的点击坐标:

    手机真实坐标 = touch_factor * 屏幕坐标
    默认计算方式是: self.display_info['window_height'] / self.display_info['height']
    但在部分特殊型号手机上可能不准确,例如iOS14.4的7P,默认值为 1/3,但部分7P点击位置不准确,可自行设置为:self.touch_factor = 1 / 3.3

Poco相关的注意事项:

  1. 由于iOS的Poco延迟很高,开启时可能也会导致卡顿
  2. 部分ipad可能在横屏+桌面下,拿到的Poco位置不对,不建议在桌面上点击某个图标来打开app,尽量使用start_app来打开,但本接口目前必须传入手机中已有的app包名,如果传入的包名不存在,可能会导致报错

BUG 修复

  1. 修复了一个Android录屏时没有完全释放系统资源的BUG,该问题可能会导致内存溢出
  2. 稍微优化了mstpl的识别效果
  3. 修复了Android10以上版本的手机可能存在的点击失败问题
  4. 去除了安装时对numpy版本号的限制
  5. 兼容了jinja2>3.1版本
  6. 修复Android6.0.1系统下,adb.file_size接口获取文件大小失败的问题

Airtest 1.2.5

Add new

  • iOS screen projection speed optimization, new MJPEG mode, viewing iOS screen images at a higher speed
  • iOS click speed optimization, please update iOS-Tagent to the latest version (if you originally used the Appium/WebDriverAgent project, you can replace it with our version) , after the update can greatly reduce the click delay
  • Please use the latest version of AirtestIDE 1.2.14, you can experience the best effect, otherwise it may cause the problem of wrong click position
  • If you use Poco, please update to version 1.0.87, otherwise it may cause the problem of wrong click position

Related Notes:

  1. On a very small number of devices, the click position may be offset. At present, the offset of the mouse click cannot be corrected on AirtestIDE, but it can be fixed in the code, for example:

    We tested an iPhone 7Plus mobile phone, and there is a coordinate offset phenomenon when clicking, so it can be corrected when running the code in the following way:

    >>> device = connect_device("iOS:///")
    >>> device.touch((100, 100))  # wrong position
    >>> print(device.touch_factor)
    0.333333
    >>> device.touch_factor = 1 / 3.3  # default is 1/3
    >>> device.touch((100, 100))
    

Explanation about touch_factor:

touch_factor This value is used to convert the touch coordinates of iOS devices:

Phone real coordinates = touch_factor * screen coordinates
The default calculation is: self.display_info['window_height'] / self.display_info['height']
But it may be inaccurate on some special models of mobile phones, such as 7P of iOS14.4, the default value is 1/3, but the click position of some 7P is inaccurate, you can set it yourself: self.touch_factor = 1 / 3.3

Poco related notes:

  1. Due to the high latency of Poco on iOS, it may also cause lag when it is turned on.
  2. Some ipads may be in landscape + desktop, and the Poco obtained is in the wrong position. It is not recommended to click an icon on the desktop to open the app, try to use start_app to open it, but this interface must be transferred to the mobile phone. For some app package names, if the incoming package name does not exist, an error may be reported

BUG fixes

  1. Fixed a bug that system resources were not completely released when Android screen recording, which may lead to memory overflow
  2. Slightly optimized the recognition effect of mstpl
  3. Fixed the possible click failure problem on mobile phones with Android 10 and above
  4. Removed the restriction on numpy version number during installation
  5. Compatible with jinja2>3.1 version
  6. Fix the problem that the adb.file_size interface fails to obtain the file size under the Android 6.0.1 system