new Select(element)
Create an Select Element
Parameters:
Name | Type | Description |
---|---|---|
element | WebElement | Select WebElement. |
- Implements
- Source
Methods
(async) deselectAll() → {Promise.<void>}
Deselects all selected options
- Implements
- Source
Returns:
- Type:
- Promise.<void>
(async) deselectByIndex(index) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
index | Number | index of option element to deselect Deselect the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting. |
- Implements
- Source
Returns:
- Type:
- Promise.<void>
(async) deselectByValue(value) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
value | String | value of an option to deselect |
- Implements
- Source
Returns:
- Type:
- Promise.<void>
(async) deselectByVisibleText(text) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
text | string | | text of option to deselect |
- Implements
- Source
Returns:
- Type:
- Promise.<void>
(async) getAllSelectedOptions() → {Promise.<void>}
Returns a list of all selected options belonging to this select tag
- Implements
- Source
Returns:
- Type:
- Promise.<void>
(async) getFirstSelectedOption() → {Promise.<Element>}
Returns first Selected Option
- Implements
- Source
Returns:
- Type:
- Promise.<Element>
(async) getOptions() → (non-null) {Promise.<!Array.<!WebElement>>}
Returns a list of all options belonging to this select tag
- Implements
- Source
Returns:
- Type:
- Promise.<!Array.<!WebElement>>
(async) isMultiple() → {Promise.<boolean>}
Returns a boolean value if the select tag is multiple
- Implements
- Source
Returns:
- Type:
- Promise.<boolean>
(async) selectByIndex(index)
Select option with specified index.
Parameters:
Name | Type | Description |
---|---|---|
index |
- Implements
- Source
(async) selectByValue(value)
Select option by specific value.
Parameters:
Name | Type | Description |
---|---|---|
value | string | value of option element to be selected |
- Implements
- Source
(async) selectByVisibleText(text)
Select option with displayed text matching the argument.
Parameters:
Name | Type | Description |
---|---|---|
text | String | | text of option element to get selected |
- Implements
- Source