| Constructor and Description |
|---|
Select(org.openqa.selenium.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<org.openqa.selenium.WebElement> |
getAllSelectedOptions() |
org.openqa.selenium.WebElement |
getFirstSelectedOption() |
java.util.List<org.openqa.selenium.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(org.openqa.selenium.WebElement element)
element - SELECT element to wrapUnexpectedTagNameException - when element is not a SELECTpublic boolean isMultiple()
isMultiple in interface ISelectpublic java.util.List<org.openqa.selenium.WebElement> getOptions()
getOptions in interface ISelectpublic java.util.List<org.openqa.selenium.WebElement> getAllSelectedOptions()
getAllSelectedOptions in interface ISelectpublic org.openqa.selenium.WebElement getFirstSelectedOption()
getFirstSelectedOption in interface ISelectorg.openqa.selenium.NoSuchElementException - If no option is selectedpublic void selectByVisibleText(java.lang.String text)
selectByVisibleText in interface ISelecttext - The visible text to match againstorg.openqa.selenium.NoSuchElementException - If no matching option elements are foundpublic void selectByIndex(int index)
selectByIndex in interface ISelectindex - The option at this index will be selectedorg.openqa.selenium.NoSuchElementException - If no matching option elements are foundpublic void selectByValue(java.lang.String value)
selectByValue in interface ISelectvalue - The value to match againstorg.openqa.selenium.NoSuchElementException - 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 againstorg.openqa.selenium.NoSuchElementException - 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 deselectedorg.openqa.selenium.NoSuchElementException - 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 againstorg.openqa.selenium.NoSuchElementException - If no matching option elements are foundjava.lang.UnsupportedOperationException - If the SELECT does not support multiple selections