v1.1.4版本更新
Android API修改:
- Android部分点击接口修改:
将Android的点击代码进行了一些维护,对于以前一部分需要调用到Android.minitouch
才能运行的接口(主要是pinch
,swipe_along
,two_finger_swipe
),现在统一直接在Android层面进行调用:
old:
dev = device()
dev.minitouch.pinch()
dev.minitouch.swipe_along([(100, 300), (300, 300), (100, 500), (300, 600)])
dev.minitouch.two_finger_swipe( (100, 100), (200, 200) )
->
new:
dev = device()
dev.pinch() # 双指捏合或分开
dev.swipe_along([(100, 300), (300, 300), (100, 500), (300, 600)]) # 连续滑过一系列坐标
dev.two_finger_swipe( (100, 100), (200, 200) ) # 两个手指一起滑动
更多调用代码示例与参数示例,可以参考:tests/test_android.py
- 如果使用了自定义点击
DownEvent/UpEvent/SleepEvent
,请将import语句修改成如下内容:
old:
from airtest.core.android.minitouch import *
->
new:
from airtest.core.android.touch_methods.base_touch import *
-
修复了部分型号的小米手机(主要是MIUI11版本)在横屏时使用javacap截图,会导致图像被不正确压缩的情况。
- 请卸载手机上已有的
Yosemite.apk
,重新连接手机即可重装新版本的Yosemite.apk
修复此问题。
注: 若手机更新到MIUI12版本,无需使用javacap模式就能直接获取到手机屏幕了,建议大家直接更新系统
- 请卸载手机上已有的
-
修复了MIUI11+android10下,
is_screenon
(手机是否亮屏)和is_locked
(手机是否锁屏)接口无法使用的bug
iOS部分修改:
- 修复iOS部分机型横屏异常及提高启动应用的速度
iOS-Tagent
对xcode的支持更新到11.5版本,iOS版本支持到13.5(最新版本的xcode目前暂时还有一些问题需要兼容)
Android API modification:
- Modification of some click interfaces of Android:
Performed some maintenance on the Android click code. For the previous part of the interface that needs to be called toAndroid.minitouch
to run (mainlypinch
,swipe_along
,two_finger_swipe
), it is now called directly at the Android level. like this:
old:
dev.minitouch.pinch()
dev.minitouch.swipe_along([(100, 300), (300, 300), (100, 500), (300, 600)])
dev.minitouch.two_finger_swipe( (100, 100), (200, 200) )
->
new:
dev.pinch() # pinch or separate with two fingers
dev.swipe_along([(100, 300), (300, 300), (100, 500), (300, 600)]) # continuously slide through a series of coordinates
dev.two_finger_swipe( (100, 100), (200, 200) ) # Two fingers slide together
For more call code examples, you can refer to tests/test_android.py
- If you used
DownEvent/UpEvent/SleepEvent
, please modify the import statement to the following:
old:
from airtest.core.android.minitouch import *
->
new:
from airtest.core.android.touch_methods.base_touch import *
- Fixed an issue where some models of Xiaomi phones (mainly the MIUI11 version) used javacap to take incorrect screenshots in landscape mode.
- Please uninstall the existing
Yosemite.apk
on your phone and reconnect the phone to reinstall the new version ofYosemite.apk
to fix this problem.
Note: If the mobile phone is updated to the MIUI12 version, you can directly get the mobile phone screen without using javacap mode. It is recommended that you update the system directly
- Please uninstall the existing
- Fixed the bug that the interfaces of
is_screenon
(whether the phone is bright) andis_locked
(whether the phone is locked) under MIUI11+android10 cannot be used
iOS modification:
- Fixed the horizontal screen abnormality of some iOS models and increase the speed of starting the application
iOS-Tagent
support for xcode is updated to version 11.5, iOS version is supported to 13.5 (the latest version of xcode currently has some problems that need to be compatible)