Releases: AirtestProject/Poco
Releases · AirtestProject/Poco
v1.0.94
本次改动
- 更新pocoservice.apk,修复了节点获取缓慢的问题
- Unity-SDK新增了
poco.sendMessage()
和poco.invoke()
接口,用于向游戏内SDK发送消息,或处理带有自定义参数调用的函数,详情请见代码diff #607 和文档说明:https://poco-chinese.readthedocs.io/en/latest/source/doc/drivers/unity3d.html#integrating-and-using-poco-interface-functions-in-unity
What's Changed
- Update pocoservice.apk to fix the problem of longer node access time #608
- set timeout to 5s by @ZSCharlie in #601
- small patch for python more than 3.10 regarding MutableMapping moving by @Evangelistic in #598
- Correct typos in exceptions.py by @felixonmars in #602
- Add functions for Unity method invocations by @Danand in #607, see https://poco-chinese.readthedocs.io/en/latest/source/doc/drivers/unity3d.html#integrating-and-using-poco-interface-functions-in-unity
Full Changelog: v1.0.93...v1.0.94
v1.0.93
更新内容:
- poco初始化时,原先是默认使用设备IP,现在支持传入指定IP连接,例如: poco = UnityPoco(addr=(ip, port))
- 如果未连接设备,默认尝试连接当前的第一台安卓设备
Updates:
- When poco initialises, it used to use the device IP by default, now it supports passing in a specified IP to connect to, e.g.:
poco = UnityPoco(addr=(ip, port))
- If no device is connected, it will try to connect to the first Android device.
v1.0.92
Update support for Android 12
更新PocoService.apk对Android 12的支持
Update support for Android 12
v1.0.88
更新内容:
- 更新了pocoservice.apk,增加了对Android 12L的支持
- 现在点击时,默认会点击控件正中心。旧版本默认点击位置为锚点位置,部分游戏控件可能会点到边缘,导致点击无效的问题
update content:
- Updated pocoservice.apk, added support for Android 12L
- Now when you click, it will click the center of the control by default. The default click position of the old version is the anchor position, and some game controls may be clicked to the edge, causing the click to be invalid.
v1.0.87
主要改动如下:
- 在初始化Android poco时,假如get_top_activity获取失败了,就暂时忽略掉,因为本步骤不是必须的
- 支持了最新的iOS-Tagent
- 新增了一个refresh()接口,用于强制刷新节点信息
1.0.85
pocoservice.apk 改动
- 修复了1.0.84版本可能带来的新问题:假如poco(xx).click()时,当前页面不止一个节点会被筛选出来,并且正好第一个节点可能是不可见节点的话,会导致点击位置超出屏幕的报错
- 部分APP的某些页面可能使用了WebView控件,以前的版本无法抓取,现在能够抓取(并不能完全保证所有的WebView都可以拿到)
- UI树的层级结构多了一层,因此能够抓取到一些之前无法抓取的控件了
- 例如部分手机的一些底部虚拟按钮、某些输入法的按键界面(如讯飞输入法)等
- 修复了一个筛选出列表后、再进行进一步条件筛选时可能会引发的报错
- 例如,
poco(xx)[0].parent().exists()
执行正常,但是poco(xx)[1].parent().exists()
就会报错
- 例如,
- 修复了部分手机可能拿到的节点信息未能实时刷新,导致运行失败的问题
- 例如:某个列表从上往下滚动时,某个节点一开始不存在,但是后来滚动到了画面中心,此时拿到的节点信息可能依然是不存在,导致脚本报错(主要在部分机型上可能出现、以及如果手机在设置-显示-大小,设置为“大”的话,也可能导致此问题)
- 此问题在1.0.84版本已经修复,但是带来了比较严重的性能问题,我们在这个版本做了优化,尽可能在刷新节点的同时保证了运行时的速度
- 去掉了当部分特殊节点无法被抓取到时的一个报错
其他改动
- 由于Android poco不能与
uiautomator
同时运行,之前的版本会在启动前强制做一些杀进程的操作,现在改为只有启动失败时,才尝试杀进程,加快启动速度 hrpc
提升至1.0.9版本,将一个在断开时可能出现的连接报错hrpc.exceptions.TransportDisconnected: HTTPConnectionPool(host='127.0.0.1', port=11385): Max retries exceeded with url: /
进行了简单处理
pocoservice.apk changes
- Fixed a new problem that version 1.0.84 may bring: If more than one node on the current page will be filtered out when poco(xx).click(), and the first node may be invisible, it will cause Click on the position beyond the screen to report an error
- Some pages of some apps may use the WebView control. The previous version could not be crawled, but now it can be crawled (it is not completely guaranteed that all WebViews are available)
- The hierarchical structure of the UI tree is one more layer, so some controls that could not be crawled before can be captured
- For example, some virtual buttons on the bottom of some mobile phones, the key interface of some input methods (such as Xunfei input method), etc.
- Fixed the problem that some node information that may be obtained by mobile phones could not be refreshed in real time, causing the operation to fail
- For example: When a list is scrolled from top to bottom, a certain node does not exist at first, but then scrolls to the center of the screen, the node information obtained at this time may still not exist, causing the script to report an error (mainly on some models) May appear on the screen, and if the phone is set to "large" in the settings-display-size, it may also cause this problem)
- This problem has been fixed in version 1.0.84, but it has brought more serious performance problems. We have made optimizations in this version to ensure the speed of runtime while refreshing nodes as much as possible
Other changes
- Since Android poco cannot run with
uiautomator
at the same time, the previous version will forcefully kill the process before starting. Now it is changed to try to kill the process only when the start fails to speed up the start. hrpc
is upgraded to version 1.0.9, a connection error that may occur when disconnected is reportedhrpc.exceptions.TransportDisconnected: HTTPConnectionPool(host='127.0.0.1', port=11385): Max retries exceeded with url: /
A simple treatment
v1.0.84
- 修改
PocoService.apk
,修复了部分型号手机(例如华为P40)可能在滑动过程中使用了之前缓存的节点信息,而导致无法正确获取到当前节点的最新信息的问题(即某个节点明明被滑动到了当前画面中,但是exists依然返回false的问题)- 这可能带来一定的性能损耗
- 【需要更新!!】去掉了
PocoService-test.apk
,目前只需要安装PocoService.apk
即可启动poco,无需安装第二个apk,因此启动poco的命令行也发生了修改- 因此,如果使用了AirtestIDE,请使用>=1.2.12的版本,如果使用本地python环境运行脚本,请执行
pip install -U pocoui
,确保pocoui的版本号>=1.0.84
- 因此,如果使用了AirtestIDE,请使用>=1.2.12的版本,如果使用本地python环境运行脚本,请执行
- 在替换版本时,会先尝试卸载旧版本,避免因为apk包签名不一致导致无法更新版本的问题
- 目前高版本安卓手机上不会再提示apk版本过低了
- 我们发现大多数手机上Poco无法正确被启动的原因,是手机限制了它的后台启动,因此大多数品牌手机可以找到应用管理/电池优化,将PocoService设置为允许自启动、允许后台启动
- Modify
PocoService.apk
to fix the problem that some models of mobile phones (such as Huawei P40) may use the previously cached node information during the sliding process, which leads to the problem that the latest information of the current node cannot be obtained correctly (that is, a certain node clearly Was swiped to the current screen, but exists still returns false)- This may bring some performance loss
- 【need to be updated! ! 】 Removed
PocoService-test.apk
, currently only need to installPocoService.apk
to start poco, no need to install a second apk, so the command line to start poco has also been modified- Therefore, if you use AirtestIDE, please use the version >=1.2.12. If you use the local python environment to run the script, please execute
pip install -U pocoui
to ensure that the version number of pocoui is >=1.0.84
- Therefore, if you use AirtestIDE, please use the version >=1.2.12. If you use the local python environment to run the script, please execute
- When replacing the version, it will try to uninstall the old version first to avoid the problem that the version cannot be updated due to inconsistent apk package signatures
- At present, the apk version will no longer be prompted on high version Android phones
1.0.83
主要改动:
- 修复了在部分机型上(例如OPPO Reno),Unity可能会无法加载UI树的情况
- 修复了如果SDK获取到的坐标和相关信息都不为float类型时,可能会异常的问题
- 修复了文档编译脚本,目前可以正常编译出文档了
- 更新了
pocoservice.apk
,能够解决在部分机型上无法识别出某些android控件的问题,不会强制更新已有的apk- 如果希望更新到这个版本apk,请先把手机里的两个名为pocoservice的apk都卸载掉,然后代码运行到初始化android poco时,会自动重装最新版本的apk