PocoAgent(hierarchy, input, screen, command=None)¶
This is the agent class for poco to communicate with target device.
This class is an aggregation of 4 major interfaces for now.
HierarchyInterface: defines the hierarchy accessibility methods such as dump(crawl the whole UI tree), getAttr(retrieve attribute value by name)
InputInterface: defines the simulated input methods to allow inject simulated input on target device
ScreenInterface: defines methods to access the screen surface
CommandInterface: defines methods to communicate with target device in arbitrary way. This is optional.
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. 返回类型:
Return the interface of this agent handled.
返回: the rpc interface of this agent handled. 返回类型:
NotImplementedError– raises if the agent implementation dose not expose the rpc interface to user.