AirtestProject / Poco

A cross-engine test automation framework based on UI inspection
http://airtest.netease.com/
Apache License 2.0
1.74k stars 315 forks source link

还会做cocos creator 3.x兼容吗? #591

Closed yangypDeveloper closed 1 year ago

yangypDeveloper commented 1 year ago

目前使用的3.6.2

Describe the bug 使用的3.x版本,在cmake中打开USE_WEBSOCKET_SERVER,可以看到可以和airtest正常通讯了,但是获取的值由于3.x的api变动,没有获取到,我给个默认值可以看到UI树正确的渲染出了了

2023-08-30 10:30:33.643 26314-26344 Cocos                   com.adai.pdgame001.test12            D  10:30:33 [DEBUG]: D/ JS: ret: {"id":"4cb4d678-e788-4a66-88f7-af57ba19852e","jsonrpc":"2.0","error":{"message":"TypeError: Cannot read property 'convertToWorldSpaceAR' of undefined\n    at u.getAttr (src/chunks/bundle.js:20:1714)\n    at u.enumerateAttrs (src/chunks/bundle.js:6:890)\n    at d.dumpHierarchyImpl (src/chunks/bundle.js:2:591)\n    at d.dumpHierarchy (src/chunks/bundle.js:2:467)\n    at a.handle_request (src/chunks/bundle.js:36:835)\n    at WebSocketServerConnection.__ondata (src/chunks/bundle.js:36:1451)"}}

To Reproduce Steps to reproduce the behaviour:

  1. 新建3.6.2工程
  2. 打开项目文件/AirTest/native/engine/common/CMakeLists.txt 中的USE_WEBSOCKET_SERVER
  3. 打印 PocoManager.prototype.handle_request 函数中的ret
  4. See error

Expected behaviour 3.x 获取位置api变动

Screenshots

image

python version: python2.7

poco version: 1.1.0

You can get poco version via pip freeze command.

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

yangypDeveloper commented 1 year ago

https://github.com/AirtestProject/Poco-SDK/pull/105