ISelect

ISelect interface makes a protocol for all kind of select elements (standard html and custom model)

Methods

deselectAll() → {Promise.<void>}

Clear all selected entries. This is only valid when the SELECT supports multiple selections.

Returns:
Type: 
Promise.<void>

deselectByIndex(index) → {Promise.<void>}

Deselect the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.

Parameters:
NameTypeDescription
indexNumber

The option at this index will be deselected

Returns:
Type: 
Promise.<void>

deselectByValue(value) → {Promise.<void>}

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

Parameters:
NameTypeDescription
valuestring

The value to match against

Returns:
Type: 
Promise.<void>

deselectByVisibleText(text) → {Promise.<void>}

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>

Parameters:
NameTypeDescription
textstring

The visible text to match against

Returns:
Type: 
Promise.<void>

getAllSelectedOptions() → (non-null) {Promise.<!Array.<!WebElement>>}

Returns:

All selected options belonging to this select tag

Type: 
Promise.<!Array.<!WebElement>>

getFirstSelectedOption() → (non-null) {Promise.<!WebElement>}

Returns:

The first selected option in this select tag (or the currently selected option in a normal select)

Type: 
Promise.<!WebElement>

getOptions() → (non-null) {Promise.<!Array.<!WebElement>>}

Returns:

All options belonging to this select tag

Type: 
Promise.<!Array.<!WebElement>>

isMultiple() → (non-null) {Promise.<boolean>}

Returns:

Whether this select element supports selecting multiple options at the same time? This is done by checking the value of the "multiple" attribute.

Type: 
Promise.<boolean>

selectByIndex(index) → {Promise.<void>}

Select the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.

Parameters:
NameTypeDescription
indexNumber

The option at this index will be selected

Returns:
Type: 
Promise.<void>

selectByValue(value) → {Promise.<void>}

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

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

Parameters:
NameTypeDescription
valuestring

The value to match against

Returns:
Type: 
Promise.<void>

selectByVisibleText(text) → {Promise.<void>}

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>

Parameters:
NameTypeDescription
textstring

The visible text to match against

Returns:
Type: 
Promise.<void>