SelectElementSelectByText Method |
Select all options by the text displayed.
Namespace: SeleniumAssembly: Selenium (in Selenium.dll) Version: 2.0.9.0 (2.0.9.0)
Syntax Dim instance As SelectElement
Dim text As String
instance.SelectByText(text)
Parameters
- text
- Type: SystemString
The text of the option to be selected. If an exact match is not found,
this method will perform a substring match.
Exceptions Exception | Condition |
---|
NoSuchElementError | Thrown if there is no element with the given text present. |
Remarks When given "Bar" this method would select an option like:
<option value="foo">Bar</option>
See Also