Get Selected Item

Reads the position, key and value of the selected item in a drop-down list (combo box). Works on Windows, browser and SAP elements; on Windows, ribbon tabs, menus and toolbar drop-down buttons are also supported. By default, Element uses the element found by the Get Element activity.


⬅️INPUT

Parameter

Type

Required

Description

Element

IElement

✅ Yes

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

Timeout

TimeSpan

❌ No

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


➡️OUTPUT

Parameter

Type

Description

Index

Int32

Position of the selected item (zero-based). 0 if no selected item is found.

Key

String

Key of the selected item: the option's display text in the browser, the entry's key on SAP. Empty on Windows and if no selected item is found.

Value

String

Value of the selected item: the option's value (value) in the browser, the entry's text on SAP, the item's text on Windows. Empty if no selected item is found.