Select Item

Selects an item in a drop-down list (combo box) or list by its key, value or position. Works on Windows, browser and SAP elements; ribbon tabs, menus and toolbar drop-down buttons on Windows and toolbar buttons on SAP are also supported. By default, Element uses the element found by the Get Element activity. In the browser, the selected item is checked after the selection; if the requested item has not been selected, the activity throws an error.


⬅️INPUT

Parameter

Type

Required

Description

Element

IElement

✅ Yes

The list to select in. If empty (null), the activity throws an error.

PostWait

TimeSpan

❌ No

The activity does not use this value.

Timeout

TimeSpan

❌ No

SAP only: maximum time to wait for the selection to complete. If left empty, 1 day.

SelectedKey

String

❌ No

Key of the item to select: the option's display text in the browser, the entry's key on SAP, the item's name on Windows. Either SelectedKey, SelectedValue or SelectedIndex must be set. If more than one is set, on Windows and SAP SelectedKey is used first, then SelectedValue, then SelectedIndex; in the browser, the first item matching any of them is selected.

SelectedValue

String

❌ No

Value of the item to select: the option's value (value) in the browser, the entry's text on SAP, the item's name on Windows.

SelectedIndex

Int32?

❌ No

Position of the item to select (zero-based).


Usage

If the activity is inside an activity with a selector (e.g. Get Element), the Get Selectable Items button on the canvas fetches the items of the list found by that parent activity's selector.

  • The value of the item selected from the drop-down list is written to the Value field; Key and Index are cleared.

  • Set Key writes the selected item's key and Set Value its value, and the other fields are cleared. Set Key is not available for Windows items that have no key.

  • The Index, Value and Key fields can also be filled manually or with a variable.