Project access poco SDK, you must know some problems

AirtestProject 2021-01-21 15:00:14
project access poco sdk know


Preface

Many novice students want to use our poco The framework gets the control tree of the project for automated testing . But they often don't know , Which projects need access to Poco-SDK To get the control tree , This Poco-SDK It's connected to where , So today we're going to connect to Poco-SDK This problem , Let's answer some questions that students often ask .

1. How to know if the project needs access Poco-SDK

It's simple , Just remember , Currently only Android native and iOS Native applications , Be able to access without Poco-SDK Under the circumstances , Use our poco frame , Like other platforms ,Cocos、unity、Egret wait , They have to be connected in advance Poco-SDK It can be used normally .

2. This Poco-SDK It's connected to where

This problem is especially common among novice students , Some of them will download it Poco-SDK Put it in the device directory , Some will put it in airtest Script directory , These are all wrong practices .

actually , We should be hold Poco-SDK Embedded in the source code of your game project , such as unity The script of the game project 、Cocos Project script, etc , Not in the device directory or in airtest Script directory .

therefore , Students often ask us that projects without source code can be accessed Poco-SDK Do you ? The answer is no .

3.unity Project access Poco-SDK Frequently asked questions about

Let's learn about it step by step .

1) download Poco-SDK package

This goes directly to our GitHub above clone Just come down :https://github.com/AirtestProject/Poco-SDK .

2) hold Unity3D Put the folder in the project script

The just now clone The compressed package coming down Poco-SDK-master.zip decompression , And then put one of them Unity3D I put the folder in you Unity Project Scripts In any position of :

Be careful , What I'm talking about here Scripts Refers to unity Game project source code .

3) according to UI Type selection

Ask the program what kind of UI The way ,SDK There are three folders in uguinguifairygui , Keep one and delete the other two , For example, the image above is ugui . Please be sure to delete the other two , Otherwise unity Will report a mistake .

4) stay unity Load the script

Create an empty GameObject ( Right click -Create Empty), Add a script (Add Component):

Other parameters are available by default ,GameObject Random names .

perhaps , Students can also be in root perhaps Lord camera these GameObject Add script on (Add Component) Unity3D/PocoManager.cs .

Some students may ask , Why create a new empty one GameObject Or choice root 、 Lord camera these GameObject To add scripts ?

In fact, it's all about mounting scripts to 1 individual Nodes that will not be destroyed in the life cycle of the game Up , And at the beginning of the game , Turn it on as soon as possible poco service .

4.Cocos-Creator Project access Poco-SDK Frequently asked questions about

Same as above , We still look at it step by step .

1) download Poco-SDK package

ditto .

2) hold cocos-creator/Poco Put the folder in the project script

Copy Poco-SDK The inside of the bag cocos-creator/Poco Folder to your cocos-creator Project script Directory , Any path can .

What I'm talking about here cocos-creator Project means cocos-creator Game project source code .

3) edit cocos-creator The configuration file for the project

Find... In the engine directory ccConfig.h file . The file path is your/path/to/CocosCreator_2.2.1/resources/cocos2d-x/cocos/base/ccConfig.h

Editor's page 62 That's ok . hold #define USE_WEBSOCKET_SERVER 0 Change it to #define USE_WEBSOCKET_SERVER 1

The purpose of this is to turn on WebSocketServer modular .

4) Add a script to a node that will never disappear

Adding scripts requires us to Manually add , for example :

At the end of the script onLoad Function , Add the following script :

onLoad:function(){
var poco = require("Poco") // Add your own here Poco.js Path to file
window.poco = new poco();
cc.log(window.poco);
},

And never disappear UI node , That's when you When switching any scene , This node will be resident , And never destroy . There are two kinds of nodes that never disappear , One is to force an attribute that will never disappear ; The other is the root node resident in memory / Special nodes , For example, the main camera node .

So we generally recommend adding scripts to the root node or the main camera node , That's all. .

5. at present poco How is your support

platform Poco Access to the document
Android Native applications Use it directly No access required Poco-SDK
Android Wechat applet Use Android directly poco https://mp.weixin.qq.com/s/R02Ac3ZC1B_ND7QVik_Z8Q
iOS Native applications Use it directly No access required Poco-SDK
unity3D Access required Poco-SDK https://poco-chinese.readthedocs.io/zh_CN/latest/source/doc/integration.html#unity3d
Cocos2dx-js Access required Poco-SDK https://poco-chinese.readthedocs.io/zh_CN/latest/source/doc/integration.html#cocos2dx-js-beta
Cocos2dx-lua Access required Poco-SDK https://poco-chinese.readthedocs.io/zh_CN/latest/source/doc/integration.html#cocos2dx-lua
Cocos-Creator Access required Poco-SDK https://poco-chinese.readthedocs.io/zh_CN/latest/source/doc/integration.html#cocos-creator
UE4 Access required Poco-SDK https://mp.weixin.qq.com/s/_3TmmFGkgdyIU-JVUFkDWw
Egret Access required Poco-SDK https://github.com/AirtestProject/Poco-SDK/tree/master/Egret

Airtest Official website http://airtest.netease.com/
Airtest Official website of the course https://airtest.doc.io.netease.com/
Build enterprise private cloud services https://airlab.163.com/b2b

Airtest Official Q & A Q Group :654700783

ah , You've seen it so seriously , Please give me a recommendation and support , Thank you very much ~

版权声明
本文为[AirtestProject]所创,转载请带上原文链接,感谢
https://javamana.com/2021/01/20210121145938956L.html

  1. 【计算机网络 12(1),尚学堂马士兵Java视频教程
  2. 【程序猿历程,史上最全的Java面试题集锦在这里
  3. 【程序猿历程(1),Javaweb视频教程百度云
  4. Notes on MySQL 45 lectures (1-7)
  5. [computer network 12 (1), Shang Xuetang Ma soldier java video tutorial
  6. The most complete collection of Java interview questions in history is here
  7. [process of program ape (1), JavaWeb video tutorial, baidu cloud
  8. Notes on MySQL 45 lectures (1-7)
  9. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  10. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  11. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  12. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  13. 【递归,Java传智播客笔记
  14. [recursion, Java intelligence podcast notes
  15. [adhere to painting for 386 days] the beginning of spring of 24 solar terms
  16. K8S系列第八篇(Service、EndPoints以及高可用kubeadm部署)
  17. K8s Series Part 8 (service, endpoints and high availability kubeadm deployment)
  18. 【重识 HTML (3),350道Java面试真题分享
  19. 【重识 HTML (2),Java并发编程必会的多线程你竟然还不会
  20. 【重识 HTML (1),二本Java小菜鸟4面字节跳动被秒成渣渣
  21. [re recognize HTML (3) and share 350 real Java interview questions
  22. [re recognize HTML (2). Multithreading is a must for Java Concurrent Programming. How dare you not
  23. [re recognize HTML (1), two Java rookies' 4-sided bytes beat and become slag in seconds
  24. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  25. RPC 1: how to develop RPC framework from scratch
  26. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  27. RPC 1: how to develop RPC framework from scratch
  28. 一次性捋清楚吧,对乱糟糟的,Spring事务扩展机制
  29. 一文彻底弄懂如何选择抽象类还是接口,连续四年百度Java岗必问面试题
  30. Redis常用命令
  31. 一双拖鞋引发的血案,狂神说Java系列笔记
  32. 一、mysql基础安装
  33. 一位程序员的独白:尽管我一生坎坷,Java框架面试基础
  34. Clear it all at once. For the messy, spring transaction extension mechanism
  35. A thorough understanding of how to choose abstract classes or interfaces, baidu Java post must ask interview questions for four consecutive years
  36. Redis common commands
  37. A pair of slippers triggered the murder, crazy God said java series notes
  38. 1、 MySQL basic installation
  39. Monologue of a programmer: despite my ups and downs in my life, Java framework is the foundation of interview
  40. 【大厂面试】三面三问Spring循环依赖,请一定要把这篇看完(建议收藏)
  41. 一线互联网企业中,springboot入门项目
  42. 一篇文带你入门SSM框架Spring开发,帮你快速拿Offer
  43. 【面试资料】Java全集、微服务、大数据、数据结构与算法、机器学习知识最全总结,283页pdf
  44. 【leetcode刷题】24.数组中重复的数字——Java版
  45. 【leetcode刷题】23.对称二叉树——Java版
  46. 【leetcode刷题】22.二叉树的中序遍历——Java版
  47. 【leetcode刷题】21.三数之和——Java版
  48. 【leetcode刷题】20.最长回文子串——Java版
  49. 【leetcode刷题】19.回文链表——Java版
  50. 【leetcode刷题】18.反转链表——Java版
  51. 【leetcode刷题】17.相交链表——Java&python版
  52. 【leetcode刷题】16.环形链表——Java版
  53. 【leetcode刷题】15.汉明距离——Java版
  54. 【leetcode刷题】14.找到所有数组中消失的数字——Java版
  55. 【leetcode刷题】13.比特位计数——Java版
  56. oracle控制用户权限命令
  57. 三年Java开发,继阿里,鲁班二期Java架构师
  58. Oracle必须要启动的服务
  59. 万字长文!深入剖析HashMap,Java基础笔试题大全带答案
  60. 一问Kafka就心慌?我却凭着这份,图灵学院vip课程百度云