selectOption abstract method

FutureOr<void> selectOption(
  1. String selector,
  2. String value
)

Selects an option from a dropdown/select element.

selector is the CSS selector for the select element. value is the value of the option to select.

Example:

await browser.selectOption('select[name="country"]', 'US');
await browser.selectOption('#category', 'electronics');

Implementation

FutureOr<void> selectOption(String selector, String value);