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.
- property attrs: dict¶
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
- property tag: str¶
Tag name.
- property value: str¶
Content of value attribute.