poco.drivers.std package

class StdPoco(port=15004, device=None, use_airtest_input=True, **kwargs)[source]

Bases: poco.pocofw.Poco

Poco standard implementation for PocoSDK protocol.

Parameters:
  • port (int) – the port number of the server that listens on the target device. default to 15004.
  • device (Device) – airtest.core.device.Device instance provided by airtest. leave the parameter default and the default device will be chosen. more details refer to airtest doc
  • options – see poco.pocofw.Poco

Examples

The simplest way to connect to a cocos2dx-lua game:

from poco.drivers.std import StdPoco
from airtest.core.api import connect_device

# connect a device first, then initialize poco object
device = connect_device('Android:///')
poco = StdPoco(10054, device)

# now you can play with poco
ui = poco('...')
ui.click()
...
class StdPocoAgent(addr=('localhost', 15004), use_airtest_input=True)[source]

Bases: poco.agent.PocoAgent

get_sdk_version(**kwargs)[source]

Retrieve the sdk version from remote runtime. Each poco agent implementation should override this method.

Returns:version string of the poco sdk. usually in “0.0.0” format. None if not provided by poco sdk.
Return type:str