Select

Provides functionality to interact with `

Classes

Select

Methods

(async) run(selector, value) → {Promise.<void>}

Selects an option in a select element using a unified selector string and a value. Supports CSS selectors (default), and prefix-based strategies: 'id:mySelect', 'name:country', 'class:dropdown'.
Parameters:
NameTypeDescription
selectorstringThe selector string for the select element.
valuestringThe value of the option to select.
Throws:
Throws an error if the select element is not found.
Type
Error
Returns:
A promise that resolves when the option is selected.
Type: 
Promise.<void>

(async) runByText(selector, text) → {Promise.<void>}

Selects an option in a select element by its visible text using a unified selector string.
Parameters:
NameTypeDescription
selectorstringThe selector string for the select element.
textstringThe visible text of the option to select.
Throws:
Throws an error if the select element or option is not found.
Type
Error
Returns:
A promise that resolves when the option is selected.
Type: 
Promise.<void>