| Constructor and Description |
|---|
Select(WebElement element)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deselectAll()
Clear all selected entries.
|
void |
deselectByIndex(int index)
Deselect the option at the given index.
|
void |
deselectByValue(java.lang.String value)
Deselect all options that have a value matching the argument.
|
void |
deselectByVisibleText(java.lang.String text)
Deselect all options that display text matching the argument.
|
java.util.List<WebElement> |
getAllSelectedOptions() |
WebElement |
getFirstSelectedOption() |
java.util.List<WebElement> |
getOptions() |
boolean |
isMultiple() |
void |
selectByIndex(int index)
Select the option at the given index.
|
void |
selectByValue(java.lang.String value)
Select all options that have a value matching the argument.
|
void |
selectByVisibleText(java.lang.String text)
Select all options that display text matching the argument.
|
public Select(WebElement element)
element - SELECT element to wrapUnexpectedTagNameException - when element is not a SELECTpublic boolean isMultiple()
isMultiple in interface ISelectpublic java.util.List<WebElement> getOptions()
getOptions in interface ISelectpublic java.util.List<WebElement> getAllSelectedOptions()
getAllSelectedOptions in interface ISelectpublic WebElement getFirstSelectedOption()
getFirstSelectedOption in interface ISelectNoSuchElementException - If no option is selectedpublic void selectByVisibleText(java.lang.String text)
selectByVisibleText in interface ISelecttext - The visible text to match againstNoSuchElementException - If no matching option elements are foundpublic void selectByIndex(int index)
selectByIndex in interface ISelectindex - The option at this index will be selectedNoSuchElementException - If no matching option elements are foundpublic void selectByValue(java.lang.String value)
selectByValue in interface ISelectvalue - The value to match againstNoSuchElementException - If no matching option elements are foundpublic void deselectAll()
deselectAll in interface ISelectjava.lang.UnsupportedOperationException - If the SELECT does not support multiple selectionspublic void deselectByValue(java.lang.String value)
deselectByValue in interface ISelectvalue - The value to match againstNoSuchElementException - If no matching option elements are foundjava.lang.UnsupportedOperationException - If the SELECT does not support multiple selectionspublic void deselectByIndex(int index)
deselectByIndex in interface ISelectindex - The option at this index will be deselectedNoSuchElementException - If no matching option elements are foundjava.lang.UnsupportedOperationException - If the SELECT does not support multiple selectionspublic void deselectByVisibleText(java.lang.String text)
deselectByVisibleText in interface ISelecttext - The visible text to match againstNoSuchElementException - If no matching option elements are foundjava.lang.UnsupportedOperationException - If the SELECT does not support multiple selections