Welcome to Poco (ポコ) documentation!

A cross-engine UI automation framework. Unity3D/cocos2dx-*/Android native APP/(Other engines SDK)/…

Fork Star 99+

Getting Started

Install Poco and PocoSDK

In order to use Poco, you must install Poco python library on your host and also install the poco-sdk in your game/app.

Poco can be installed straightforward with pip command

pip install pocoui

For poco-sdk integration please refer to Integration Guide

Using Poco as Python package

Simple demo

The following example shows a simple script on demo game using Unity3D. Check More examples section for more detailed info.

First you should connect your Android phone, for example, via usb cable and enable the ADB DEBUG MODE.

# coding=utf-8

import time
from poco.drivers.unity3d import UnityPoco

poco = UnityPoco()


shell = poco('shell').focus('center')
for star in poco('star'):

assert poco('scoreVal').get_text() == "100", "score correct."
poco('btn_back', type='Button').click()

Tools for writing test scripts

To retrieve the UI hierarchy of the game, please use our AirtestIDE (an IDE for writing test scripts) or standalone PocoHierarchyViewer (to viewer the hierarchy and attributes only but lightweight) !


API reference

Dump UI hierarchy example

Poco defines an uniform format to serialize UI hierarchy for different game engines. This section shows how to dump UI hierarchy.

import json
from poco.drivers.unity3d import UnityPoco as Poco

poco = Poco()
ui = poco.agent.hierarchy.dump()
print(json.dumps(ui, indent=4))

The following is the snippet of UI hierarchy. All UI elements are organized in dict representing the tree structure. More detailed info about properties are described in .dumpHierarchy().

    "name": "OctopusArea",
    "payload": {
        "name": "OctopusArea",
        "type": "GameObject",
        "visible": true,
        "clickable": true,
        "zOrders": {
            "global": 0,
            "local": -10
        "scale": [
        "anchorPoint": [
        "pos": [
        "size": [
    "children": [

Join to discuss!

join slack