HumHub Documentation (unofficial)

WebDriverSelectInterface

Models an element of select type, providing helper methods to select and deselect options.

Table of Contents

Methods

deselectAll()  : mixed
Deselect all options in multiple select tag.
deselectByIndex()  : mixed
Deselect the option at the given index.
deselectByValue()  : mixed
Deselect all options that have value attribute matching the argument. That is, when given "foo" this would deselect an option like:
deselectByVisiblePartialText()  : mixed
Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:
deselectByVisibleText()  : mixed
Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:
getAllSelectedOptions()  : array<string|int, WebDriverElement>
getFirstSelectedOption()  : WebDriverElement
getOptions()  : array<string|int, WebDriverElement>
isMultiple()  : bool
selectByIndex()  : mixed
Select the option at the given index.
selectByValue()  : mixed
Select all options that have value attribute matching the argument. That is, when given "foo" this would select an option like:
selectByVisiblePartialText()  : mixed
Select all options that display text partially matching the argument. That is, when given "Bar" this would select an option like:
selectByVisibleText()  : mixed
Select all options that display text matching the argument. That is, when given "Bar" this would select an option like:

Methods

deselectByIndex()

Deselect the option at the given index.

public deselectByIndex(int $index) : mixed
Parameters
$index : int

The index of the option. (0-based)

Tags
throws
UnsupportedOperationException

If the SELECT does not support multiple selections

deselectByValue()

Deselect all options that have value attribute matching the argument. That is, when given "foo" this would deselect an option like:

public deselectByValue(string $value) : mixed

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

Parameters
$value : string

The value to match against.

Tags
throws
UnsupportedOperationException

If the SELECT does not support multiple selections

deselectByVisiblePartialText()

Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:

public deselectByVisiblePartialText(string $text) : mixed

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

Parameters
$text : string

The visible text to match against.

Tags
throws
UnsupportedOperationException

If the SELECT does not support multiple selections

deselectByVisibleText()

Deselect all options that display text matching the argument. That is, when given "Bar" this would deselect an option like:

public deselectByVisibleText(string $text) : mixed

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

Parameters
$text : string

The visible text to match against.

Tags
throws
UnsupportedOperationException

If the SELECT does not support multiple selections

isMultiple()

public isMultiple() : bool
Return values
bool

Whether this select element support selecting multiple options.

selectByValue()

Select all options that have value attribute matching the argument. That is, when given "foo" this would select an option like:

public selectByValue(string $value) : mixed

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

Parameters
$value : string

The value to match against.

Tags
throws
NoSuchElementException

selectByVisiblePartialText()

Select all options that display text partially matching the argument. That is, when given "Bar" this would select an option like:

public selectByVisiblePartialText(string $text) : mixed

<option value="bar">Foo Bar Baz</option>

Parameters
$text : string

The visible text to match against.

Tags
throws
NoSuchElementException

selectByVisibleText()

Select all options that display text matching the argument. That is, when given "Bar" this would select an option like:

public selectByVisibleText(string $text) : mixed

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

Parameters
$text : string

The visible text to match against.

Tags
throws
NoSuchElementException

        
On this page

Search results