WebDriverSelect
class WebDriverSelect implements WebDriverSelectInterface (View source)
Models a default HTML <select>
tag, providing helper methods to select and deselect options.
Methods
No description
No description
No description
No description
Select the option at the given index.
Select all options that have value attribute matching the argument. That is, when given "foo" this would select an option like:
Select all options that display text matching the argument. That is, when given "Bar" this would select an option like:
Select all options that display text partially matching the argument. That is, when given "Bar" this would select an option like:
Deselect all options in multiple select tag.
Deselect the option at the given index.
Deselect all options that have value attribute matching the argument. That is, when given "foo" this would deselect an option like:
Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:
Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:
Details
__construct(WebDriverElement $element)
No description
bool
isMultiple()
No description
WebDriverElement[]
getOptions()
No description
WebDriverElement[]
getAllSelectedOptions()
No description
WebDriverElement
getFirstSelectedOption()
No description
selectByIndex(int $index)
Select the option at the given index.
selectByValue(string $value)
Select all options that have value attribute matching the argument. That is, when given "foo" this would select an option like:
<option value="foo">Bar</option>
selectByVisibleText(string $text)
Select all options that display text matching the argument. That is, when given "Bar" this would select an option like:
<option value="foo">Bar</option>
selectByVisiblePartialText(string $text)
Select all options that display text partially matching the argument. That is, when given "Bar" this would select an option like:
<option value="bar">Foo Bar Baz</option>
deselectAll()
Deselect all options in multiple select tag.
deselectByIndex(int $index)
Deselect the option at the given index.
deselectByValue(string $value)
Deselect all options that have value attribute matching the argument. That is, when given "foo" this would deselect an option like:
<option value="foo">Bar</option>
deselectByVisibleText(string $text)
Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:
<option value="foo">Bar</option>
deselectByVisiblePartialText(string $text)
Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:
<option value="foo">Foo Bar Baz</option>
protected
selectOption(WebDriverElement $option)
Mark option selected
protected
deselectOption(WebDriverElement $option)
Mark option not selected