Skip to main content

Select Dropdown Option

Selects a value from an HTML dropdown element using either the value or the text of the dropdown item.

Category: Web Element Interaction · Group: Web · Activity name: DropDownSelect

The DropDownSelect activity in the designer

Example

DropDownSelect("<selector>", iframeSelector="<iframeSelector>", iframeSelectors=[], text="<text>", index=0)

Inputs

NameTypeRequiredDefaultDescription
SelectorstringYesCSS selector or XPath to identify dropdown.
iFrame SelectorstringCSS selector or XPath to locate the iframe containing the target element. Leave empty if the element is not inside an iframe.
iFrame SelectorsarrayAn ordered array of CSS selectors or XPaths to locate nested iframes containing the target element. Provide selectors in order from outermost to innermost iframe (e.g., ['#parent-frame', '.child-frame'] for an element inside a child iframe that's within a parent iframe). Leave empty if the element is not inside any iframes.
Drop down name/valuestringThe name or value of the dropdown item that is to be selected. If specified, Drop down index will be ignored.
Drop down indexintegerThe index of the dropdown item that is to be selected. This will be ignored if Drop down name/value is specified. The indexation starts from 0.