select_by_value
The command to select an <option> by its value within a <select> dropdown element.
Syntax
Usage
correct usage
incorrect usage
Arguments
value (Any)
- The value of the option to select. Usually astr
, but can be other types.
Yields
Element - The current instance of Element so you can chain commands.
Examples
Given this HTML
We can select any of the options
Give this a try yourself! https://the-internet.herokuapp.com/dropdown
See also
click() - If the dropdown is NOT a <select> element,
.click()
will work
Last updated