utils module

current_platform()str[source]

Return current platform name.

Returns

the platform name. only be one of mac win64 win32.

Raises

OSError – if current platform is not supported.

parse_locator(locator: str)tuple[source]

validate that the locator string must a valid css or xpath.

Parameters

locator – a locator string.

Returns

a tuple contains locator_type and locator_string.

Raises

LocatorNotAValidSelectorOrXPath – locator is not a valid selector or xpath string.