poco.sdk.exceptions module

This module provides several exceptions for poco-sdk. These exceptions are raised only in sdk corresponding runtime.

exception NoSuchTargetException[source]

Bases: exceptions.Exception

Raised when the index is out of range for selecting the UI element by given index.

exception NodeHasBeenRemovedException(attrName, node)[source]

Bases: exceptions.Exception

Raised when the node (UI element) is refreshed (updated, recycled or destroyed) while retrieving the attributes during traversing the hierarchy.

In some engines implementations, the UI hierarchy is refreshed in a stand-alone thread while poco is performing the traverse process, so the engine error might be triggered when poco is trying to retrieve the attribute of the UI element but the attribute is being updated at the same time. In this situation, poco sdk catches the engine error and raises this exception.

exception UnableToSetAttributeException(attrName, node)[source]

Bases: exceptions.Exception

Raised when settings the attribute of the given UI element failed. In most cases, the reason why it failed is that the UI element does not support mutation. From the point of view of SDK implementation, this exception can be raised proactively to indicate that the modification of the attribute is not allowed.

exception NoSuchComparatorException(matchingMethod, matcherName)[source]

Bases: exceptions.Exception

Raised when the matcher does not support the given comparison method.