arjuna.tpi.guiauto.model.gns module¶
- class arjuna.tpi.guiauto.model.gns.GNS(gui_or_element, gui_def)¶
Bases:
object
Gui Namespace object associated with a Gui or GuiElement.
Not meant to be directly created. Available as gns property of a Gui.
- Parameters
gui_or_element – Gui or GuiElement object.
gui_def – Gui Definition
Note
To locate a GUI Widget using GNS object, you can use the . notation. For example:
gui.gns.some_label some_element.gns.some_label
This will locate the GuiWidget using the GuiWidgetMetaData corresponding to following entry in GNS file:
labels: some_label: <metdata dictionary>
gui.gns will locate it in the root GuiWidget of Gui if available and allowed.
some_element.gns.some_label will do a nested locating inside some_element.
- contains(*labels)¶
Check whether this GuiAppContent object contains a GuiWidget corresponding to any of the GNS labels. Includes dynamic waiting.
- Keyword Arguments
*labels – One or more GNS labels.
Note
By default Wait is done until ArjunaOption.GUIAUTO_MAX_WAIT in the Configuration object associated with this GuiAppContent.
You can provide max_wait key-value for GNS label(s) in GNS file to change this. Value is considered in seconds.
- formatter(**fargs) arjuna.tpi.guiauto.meta.formatter.GNSLabelFormatter ¶
Create a
GNSLabelFormatter
object.- Keyword Arguments
**fargs – Arbitrary key-value pairs to be used for formatting identifiers in GuiWidgetDefinition.
- wait_until_absent(*labels)¶
Wait until GuiWidget corresponding to any of the GNS labels is present.
- Parameters
*labels – One or more GNS labels.
Note
By default Wait is done until ArjunaOption.GUIAUTO_MAX_WAIT in the Configuration object associated with this GuiAppContent.
You can provide max_wait key-value for GNS label(s) in GNS file to change this. Value is considered in seconds.