Skip to content

v1.3.1

Compare
Choose a tag to compare
@yimelia yimelia released this 28 Sep 03:54
· 49 commits to master since this release
  1. 报告中现在将会显示connect_device接口连接的设备
  2. ios和android设备在连接时,支持传入name参数,用于指定它的udid(ios)或serial number(android)
    例如: ios:///http://10.240.145.171:20092?name=83282c400efc9122e3bcba60c803cf318a6b3822
    安卓远程设备: android://127.0.0.1:5037/10.227.71.86:20029?name=serialno
  3. adb现在将会优先使用当前的adb进程,或者是系统变量设置了ANDROID_HOME中的adb,如果都找不到,才会使用airtest里的adb。
    同时也支持直接指定adb_path,例如:
from airtest.core.android.android import Android, ADB

adb = ADB(adb_path=r"D:\adb\adb.exe")

# 或者可以初始化一个指定了adb_path的Android设备对象
dev = Android(serialno="5TSSMVBYUSEQNRY5", adb_path=r"D:\test\adb41\adb.exe")
  1. 剪贴板的相关接口增加了安卓的支持,增加了粘贴接口(paste,效果等同于执行 text(get_clipboard())
text = "test_clipboard"
set_clipboard(text)

get_text = get_clipboard()
print(get_text)  # -> test_clipboard

paste()  # => text(get_clipboard())

bug修复:
修复了一些小问题
如果遇到了手机画面只有一半的情况,重新连接画面即可恢复。


  1. The report will now display the devices connected to the connect_device interface.
  2. When connecting ios and android devices, the name parameter can be passed in to specify its udid (ios) or serial number (android)
    For example: ios:///http://10.240.145.171:20092?name=83282c400efc9122e3bcba60c803cf318a6b3822
    Android remote device: android://127.0.0.1:5037/10.227.71.86:20029?name=serialno
  3. adb will now give priority to using the current adb process, or the system variable is set to adb in ANDROID_HOME. If neither is found, adb in airtest will be used.
    It also supports directly specifying adb_path, for example:
from airtest.core.android.android import Android, ADB

adb = ADB(adb_path=r"D:\adb\adb.exe")

# Or specify adb_path when initializing the Android object
dev = Android(serialno="5TSSMVBYUSEQNRY5", adb_path=r"D:\test\adb41\adb.exe")
  1. The relevant interfaces of the clipboard have been added with Android support and a paste interface (paste, the effect is equivalent to executing text(get_clipboard()))
text = "test_clipboard"
set_clipboard(text)

get_text = get_clipboard()
print(get_text) # -> test_clipboard

paste() # => text(get_clipboard())

bug fixes:
Fixed some minor issues
If you encounter a situation where the screen on your phone is only half full, you can restore the screen by reconnecting.