errors module

class ErrorMixin(**ctx: Any)[source]

Bases: object

The mixin for base exceptions.

Parameters

ctx (Any) – content variables.

code: str

Type identification code.

msg_template: str

Error message template.

exception Error(**ctx: Any)[source]

Bases: errors.ErrorMixin, Exception

Base-class for all exceptions raised by this plugin.

code: str
msg_template: str
exception PathError(path: str, **kwargs: Any)[source]

Bases: errors.Error

The base-class for all path-related exceptions.

Parameters

path (str) – path string.

code: str
msg_template: str
exception PathNotAExecutableError(path: str, **kwargs: Any)[source]

Bases: errors.PathError

code: str = 'file.not_a_executable'
msg_template: str = 'path "{path}" does not point to a executable file'
exception LocatorError(locator: str, **kwargs: Any)[source]

Bases: errors.Error

The base-class for all locator-related exceptions.

Parameters

path (str) – locatore string.

code: str
msg_template: str
exception LocatorNotAValidSelectorOrXPathError(locator: str, **kwargs: Any)[source]

Bases: errors.LocatorError

code: str = 'locator.not_a_valid_selector_or_xpath'
msg_template: str = 'locator "{locator}" is not a valid selector or xpath string.'
exception ElementError(locator: str, **kwargs: Any)[source]

Bases: errors.Error

The base-class for all element-related exceptions.

Parameters

locator (str) – element locator string.

code: str
msg_template: str
exception ElementNotExistError(locator: str, **kwargs: Any)[source]

Bases: errors.ElementError

code: str = 'element.not_exist'
msg_template: str = 'Element "{locator}" not exist.'
exception ElementTimeoutError(locator: str, timeout: int, action: str = 'appear')[source]

Bases: errors.ElementError

code: str = 'element.timeout'
msg_template: str = 'Wait for element "{locator}" to {action} failed: timeout {timeout}ms exceeds.'