Classes
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:
| Name | Type | Description |
|---|---|---|
selector | string | The selector string for the select element. |
value | string | The 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:
| Name | Type | Description |
|---|---|---|
selector | string | The selector string for the select element. |
text | string | The 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>