arjuna.tpi.guiauto.source.element module

class arjuna.tpi.guiauto.source.element.GuiElementSource(raw_source)

Bases: arjuna.tpi.guiauto.source.base.SingleGuiEntitySource

Abstract Base class for GUI Source of a Singular GUI entity (GuiPage or GuiElement).

Not meant to be directly constructed by a test author. Retrieve as:

gui_element.source
Parameters:raw_source – Raw XML source.
attrs

All attributes as a dictionary.

get_attr_value(attr, optional=False) → str

Get value of an attribute.

Parameters:attr – Attribute name
Keyword Arguments:
 optional – Set to True if this attribute is optional. Default is False.
Raises:Exception if optional is False and attribute is not found.
get_value(optional=False)

Get content of value attribute.

Keyword Arguments:
 optional – Set to True if value attribute is optional. Default is False.
Raises:Exception if optional is False and value attribute is not found.
is_attr_present(attr) → bool

Check if an attribute is present.

Parameters:attr – Attribute name
tag

Tag name.

value

Content of value attribute.