arjuna.tpi.guiauto.widget.element module¶
- class arjuna.tpi.guiauto.widget.element.GuiElement(gui, wmd)¶
Bases:
arjuna.tpi.engine.asserter.AsserterMixIn
,arjuna.tpi.guiauto.base.container.GuiWidgetContainer
,arjuna.tpi.guiauto.base.locatable.Locatable
,arjuna.tpi.guiauto.base.single_widget.SingleGuiWidget
Represents a single element in GUI of any kind.
Not meant to be directly created. It is created using calls from Gui object or GuiNamespace object of Gui.
- Parameters
gui – Gui object containing this element.
wmd – GuiElementMetaData object for this element.
- contains(*, fargs=None, **kwargs)¶
Check whether this GuiElement object contains a GuiWidget. Includes dynamic waiting.
- Keyword Arguments
fargs – A dictionary of key-value pairs for formatting the GuiWidgetDefinition. Use .format(**kwargs).wait_until_absent for more Pythonic code when formatting.
**kwargs – Arbitrary key-value pairs used to construct a GuiWidgetDefinition
Note
By default Wait is done until ArjunaOption.GUIAUTO_MAX_WAIT in the Configuration object associated with this GuiElement.
You can pass max_wait argument to change this. Value is considered in seconds.
- dropdown(fargs=None, **kwargs)¶
Locate a GuiDropDown.
- Keyword Arguments
fargs – A dictionary of key-value pairs for formatting the GuiWidgetDefinition. Use .format(kwargs).wait_until_absent for more Pythonic code when formatting.
**kwargs – Arbitrary key-value pairs used to construct a GuiWidgetDefinition
- Returns
GuiDropDown object.
- element(*, fargs=None, **kwargs)¶
Locate a GuiElement.
- Keyword Arguments
fargs – A dictionary of key-value pairs for formatting the GuiWidgetDefinition. Use .format(kwargs).wait_until_absent for more Pythonic code when formatting.
**kwargs – Arbitrary key-value pairs used to construct a GuiWidgetDefinition
- Returns
GuiElement object.
- formatter(**fargs) arjuna.tpi.guiauto.meta.formatter.GuiWidgetDefinitionFormatter ¶
Create a
GuiWidgetDefinitionFormatter
object.- Keyword Arguments
**fargs – Arbitrary key-value pairs to be used for formatting identifiers in GuiWidgetDefinition.
- frame(fargs=None, **kwargs)¶
Locate a GuiFrame
- Keyword Arguments
fargs – A dictionary of key-value pairs for formatting the GuiWidgetDefinition. Use .format(kwargs).wait_until_absent for more Pythonic code when formatting.
**kwargs – Arbitrary key-value pairs used to construct a GuiWidgetDefinition
- Returns
GuiFrame object
- property gns¶
Gui Namespace (GNS) object for this GuiElement.
- locate(locator)¶
Locate a GuiWidget.
- Parameters
locator – GuiWidgetDefinition object.
Returns – An object of type GuiWidget. Exact object type depends on the value of type attribute in GuiWidgetDefinition.
- multi_element(fargs=None, **kwargs)¶
Locate a GuiMultiElement.
- Keyword Arguments
fargs – A dictionary of key-value pairs for formatting the GuiWidgetDefinition. Use .format(kwargs).wait_until_absent for more Pythonic code when formatting.
**kwargs – Arbitrary key-value pairs used to construct a GuiWidgetDefinition
- Returns
GuiMultiElement object.
- radio_group(fargs=None, **kwargs)¶
Locate a GuiRadioGroup
- Keyword Arguments
fargs – A dictionary of key-value pairs for formatting the GuiWidgetDefinition. Use .format(kwargs).wait_until_absent for more Pythonic code when formatting.
**kwargs – Arbitrary key-value pairs used to construct a GuiWidgetDefinition
- Returns
GuiRadioGroup object
- property root_element¶
Root Element for this GuiElement.
- wait_until_absent(*, fargs=None, **kwargs)¶
Wait until a GuiWidget is absent inside this GuiElement.
- Keyword Arguments
fargs – A dictionary of key-value pairs for formatting the GuiWidgetDefinition. Use .format(**kwargs).wait_until_absent for more Pythonic code when formatting.
**kwargs – Arbitrary key-value pairs used to construct a GuiWidgetDefinition
Note
By default Wait is done until ArjunaOption.GUIAUTO_MAX_WAIT in the Configuration object associated with this GuiElement.
You can pass max_wait argument to change this. Value is considered in seconds.