poco.exceptions module
- exception InvalidOperationException(message=None)[source]
Bases:
PocoExceptionRaised when the operation performing on target device is foreseen, e.g. instruction to click outside the screen is definitely meaningless, then the
InvalidOperationExceptionis raised.
- exception PocoException(message=None)[source]
Bases:
ExceptionBase class for errors and exceptions of Poco. It is Python3 compatible.
- exception PocoNoSuchNodeException(objproxy)[source]
Bases:
PocoExceptionRaised when the UI element specified by query expression cannot be found.
- exception PocoTargetRemovedException(action, objproxy)[source]
Bases:
PocoExceptionRaised when the hierarchy structure changed over the selection or when accessing the UI element that is already recycled.
In most cases, there is no need to handle this exception manually. If this exception occurs, it usually means it is a bug in your code rather than application itself. Check your code first. The most of misuses comes from as follows.
Examples
button1 = poco('button1') time.sleep(10) # waiting for long enough before the UI hierarchy changing button1.click() # PocoTargetRemovedException will raise at this line. Because the 'button1' is not on the screen.
- exception PocoTargetTimeout(action, poco_obj_proxy)[source]
Bases:
PocoExceptionRaised when the timeout expired while waiting for some condition to be fulfilled, e.g. waiting for the specific UI element but it has not appeared on the screen.