SelectElement SelectByValue Method WebDriver
Select an option by the value.

Namespace: OpenQA.Selenium.Support.UI
Assembly: WebDriver.Support (in WebDriver.Support.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax

public void SelectByValue(
	string value
)

Parameters

value
Type: OnlineSystem String
The value of the option to be selected.
Exceptions

ExceptionCondition
OpenQA.Selenium NoSuchElementExceptionThrown when no element with the specified value is found.
Remarks

When given "foo" this method will select an option like:

<option value="foo">Bar</option>

See Also