### Poco Broker Server Output Example Source: https://github.com/airtestproject/poco-sdk/blob/master/Egret/readme.md This is an example of the log output when the Poco broker server starts successfully and begins listening for connections. ```bash ~ python -m poco.utils.net.stdbroker "ws://*:5003" "tcp://*:15004" server listens on ("0.0.0.0", 5003) transport websocket server listens on ("0.0.0.0", 15004) transport socket StdBroker on. server on accept. ``` -------------------------------- ### Start Poco Broker Server Source: https://github.com/airtestproject/poco-sdk/blob/master/Egret/readme.md This command starts the Poco broker server, which is necessary for connecting AirtestIDE to your Egret application. You can specify custom ports for WebSocket and TCP if needed. ```bash python -m poco.utils.net.stdbroker ws://*:5003 tcp://*:15004 ``` -------------------------------- ### Click UI Element Source: https://github.com/airtestproject/poco-sdk/blob/master/Unreal/README.md Example of clicking a UI element named 'StartButton' using the initialized Poco object. ```python poco("StartButton").click() ``` -------------------------------- ### Install Pocoui Source: https://github.com/airtestproject/poco-sdk/blob/master/Unreal/README.md Update the pocoui package to the latest version. Ensure the poco version is at least 1.0.79. ```bash pip install --upgrade pocoui ``` -------------------------------- ### Initialize UE4Poco Source: https://github.com/airtestproject/poco-sdk/blob/master/Unreal/README.md Initialize UE4Poco to connect to the game. This is the standard way to connect. ```python from poco.drivers.ue4 import UE4Poco poco = UE4Poco() ``` -------------------------------- ### Initialize UE4Poco in Editor Mode Source: https://github.com/airtestproject/poco-sdk/blob/master/Unreal/README.md Initialize UE4Poco with the ue4_editor=True parameter to connect in editor mode. The editor language must be set to English. ```python poco = UE4Poco(ue4_editor=True) ``` -------------------------------- ### Map Mobile Port to Computer Source: https://github.com/airtestproject/poco-sdk/blob/master/Egret/readme.md Use this command to map the mobile device's port 5003 to your computer's port 5003, enabling communication between the device and the broker running on your computer. ```bash adb reverse tcp:5003 tcp:5003 ``` -------------------------------- ### Connect to Specific UE4 Window Source: https://github.com/airtestproject/poco-sdk/blob/master/Unreal/README.md Connect to a specific UE4 window using a regular expression to match the window title. This is useful if the default connection fails. ```python dev = connect_device("Windows:///?class_name=UnrealWindow&title_re=.*Game Preview Standalone.*") ``` -------------------------------- ### AirtestIDE Poco Connection Log Source: https://github.com/airtestproject/poco-sdk/blob/master/Egret/readme.md This log indicates that AirtestIDE has successfully connected to the Poco broker. It shows the connection details and the beginning of a JSON-RPC message. ```bash server on accept. accept from: ('127.0.0.1', 56872) received_message from ('127.0.0.1', 56323) {"id":"2a0ce828-132e-4d15-a645-55493d7eaf4b","jsonrpc":"2.0","result":{"children" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.