ListBox
flaui.core.automation_elements.ListBox
Bases: AutomationElement
Class to interact with a list box element
items
property
Returns all the list box items
Returns:
| Type | Description |
|---|---|
List[ListBoxItem]
|
List of ListBoxItem elements |
selected_item
property
Gets the first selected item or null otherwise.
Returns:
| Type | Description |
|---|---|
ListBoxItem
|
ListBoxItem element if selected, else None |
selected_items
property
add_to_selection(value)
Add a row to the selection by index/by text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Union[str, int]
|
Text/Index |
required |
Returns:
| Type | Description |
|---|---|
ListBoxItem
|
ListBoxItem element |
Source code in flaui/core/automation_elements.py
remove_from_selection(value)
Remove a row to the selection by index/by text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Union[str, int]
|
Text/Index |
required |
Returns:
| Type | Description |
|---|---|
ListBoxItem
|
ListBoxItem element |
Source code in flaui/core/automation_elements.py
select(value)
Selects an item by index or text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Union[str, int]
|
Text to select/Index to select by |
required |
Returns:
| Type | Description |
|---|---|
ListBoxItem
|
ListBoxItem element |