poco.drivers.std package¶
-
class
StdPoco
(port=15004, device=None, use_airtest_input=True, **kwargs)[源代码]¶ -
Poco standard implementation for PocoSDK protocol.
参数: - 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 byairtest
. leave the parameter default and the default device will be chosen. more details refer toairtest doc
- options – see
poco.pocofw.Poco
实际案例
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() ...
- port (
-
class
StdPocoAgent
(addr=('localhost', 15004), use_airtest_input=True)[源代码]¶ -
-
get_sdk_version
()[源代码]¶ Retrieve the sdk version from remote runtime. Each poco agent implementation should override this method.
返回: version string of the poco sdk. usually in “0.0.0” format. None if not provided by poco sdk. 返回类型: str
-
rpc
¶ Return the interface of this agent handled.
返回: the rpc interface of this agent handled. 返回类型: object
Raises: NotImplementedError
– raises if the agent implementation dose not expose the rpc interface to user.
-