Appian Dropdown
Use a dropdown when a user needs to choose one value from a list.
Read the current value
dropdown = page.dropdown(label="Status")
current = dropdown.value()
assert dropdown.is_selected("Active")
is_selected(value) reads the current state. It does not wait for a different value to become selected.
Matching a dropdown
Exact, visible matching is the default:
page.dropdown(label="Status")
page.dropdown(label="Stat", exact=False)
page.dropdown(label="Status", visible=False)
page.dropdown(label="Status", visible=None)
For normal business automation, keep the default visible=True. Change visible only when your scenario specifically requires a component that is not currently visible.
Select by option position
Option indexes are one-based:
index=1 selects the first real option. Placeholder values such as Select a Value are not counted.
Search before selecting
Some dropdowns provide a search box after they are opened. Use search_text to filter the available choices, then select by value or index:
page.dropdown(label="Product").select(
search_text="Lap",
value="Laptop",
)
page.dropdown(label="Product").select(
search_text="Lap",
index=1,
)
The dropdown waits for the requested option to become available when Appian is still loading choices.
Component indexing
Component indexes are zero-based Python indexes:
This is different from option indexes, which are one-based.
Inside a table cell
page.grid(label="Items").cell(
row_name="Item 1001",
column_name="Status",
).dropdowns[0].select(value="Active")
Waiting for a dependent dropdown
Some fields become enabled after another selection. is_enabled() checks immediately; is_enabled(timeout=...) waits up to the supplied number of seconds.
page.dropdown(label="Status").select(value="Active")
owner = page.dropdown(label="Owner")
if owner.is_enabled(timeout=8):
owner.select(value="Example User")
A component-level timeout can also be supplied when creating the dropdown:
API
AppianDropdown
Represent an Appian dropdown identified by its field label.
Appian renders dropdowns as role=combobox elements whose
aria-labelledby attribute references the field label. The associated
option list is connected through aria-controls. This component relies
on those semantic relationships rather than generated Appian CSS classes.
wait_until_visible
Wait until the dropdown is visible, then return this component.
is_enabled
Return whether the dropdown is enabled, optionally waiting.
With no timeout argument this is an immediate state query and does
not inherit the component timeout or framework WAIT_TIME. When a
positive timeout in seconds is supplied, wait up to that duration for
Appian to make the live combobox enabled. A timeout returns False
rather than raising.
is_selected
Return whether value is the dropdown's current selection.
options
Return the currently available option labels.
The dropdown is expanded if needed. For searchable dropdowns this returns the options currently rendered before any filtering.
select
select(
value: str | int | None = None,
*,
search_text: str | None = None,
index: int | str | None = None,
exact: bool = True
) -> "AppianDropdown"
Select an option by value or 1-based index.
search_text optionally filters a searchable Appian dropdown before
selecting either value or index. Numeric string indexes such as
"1" are accepted. Exactly one of value or index must be
supplied. A positional integer value is treated as an index for backward
compatibility.