
public class GrapheneSelectImpl extends Object implements GrapheneSelect
Select after resolving issues with getDomProperty() and getDomAttribute() methods
Models a SELECT tag, providing helper methods to select and deselect options.
| Constructor and Description |
|---|
GrapheneSelectImpl(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(String value)
Deselect all options that have a value matching the argument.
|
void |
deselectByVisibleText(String text)
Deselect all options that display text matching the argument.
|
boolean |
equals(Object o) |
List<org.openqa.selenium.WebElement> |
getAllSelectedOptions() |
org.openqa.selenium.WebElement |
getFirstSelectedOption() |
List<org.openqa.selenium.WebElement> |
getOptions() |
org.openqa.selenium.WebElement |
getWrappedElement() |
int |
hashCode() |
boolean |
isMultiple() |
void |
selectByIndex(int index)
GrapheneSelect the option at the given index.
|
void |
selectByValue(String value)
GrapheneSelect all options that have a value matching the argument.
|
void |
selectByVisibleText(String text)
GrapheneSelect all options that display text matching the argument.
|
void |
setIsMulti(boolean isMulti) |
public GrapheneSelectImpl(org.openqa.selenium.WebElement element)
element - SELECT element to wrappublic void setIsMulti(boolean isMulti)
setIsMulti in interface GrapheneSelectpublic org.openqa.selenium.WebElement getWrappedElement()
getWrappedElement in interface org.openqa.selenium.WrapsElementpublic boolean isMultiple()
isMultiple in interface org.openqa.selenium.support.ui.ISelectpublic List<org.openqa.selenium.WebElement> getOptions()
getOptions in interface org.openqa.selenium.support.ui.ISelectpublic List<org.openqa.selenium.WebElement> getAllSelectedOptions()
getAllSelectedOptions in interface org.openqa.selenium.support.ui.ISelectpublic org.openqa.selenium.WebElement getFirstSelectedOption()
getFirstSelectedOption in interface org.openqa.selenium.support.ui.ISelectorg.openqa.selenium.NoSuchElementException - If no option is selectedpublic void selectByVisibleText(String text)
<option value="foo">Bar</option>
selectByVisibleText in interface org.openqa.selenium.support.ui.ISelecttext - The visible text to match againstorg.openqa.selenium.NoSuchElementException - If no matching option elements are foundpublic void selectByIndex(int index)
selectByIndex in interface org.openqa.selenium.support.ui.ISelectindex - The option at this index will be selectedorg.openqa.selenium.NoSuchElementException - If no matching option elements are foundpublic void selectByValue(String value)
<option value="foo">Bar</option>
selectByValue in interface org.openqa.selenium.support.ui.ISelectvalue - The value to match againstorg.openqa.selenium.NoSuchElementException - If no matching option elements are foundpublic void deselectAll()
deselectAll in interface org.openqa.selenium.support.ui.ISelectUnsupportedOperationException - If the SELECT does not support multiple selectionspublic void deselectByValue(String value)
<option value="foo">Bar</option>
deselectByValue in interface org.openqa.selenium.support.ui.ISelectvalue - The value to match againstorg.openqa.selenium.NoSuchElementException - If no matching option elements are foundUnsupportedOperationException - If the SELECT does not support multiple selectionspublic void deselectByIndex(int index)
deselectByIndex in interface org.openqa.selenium.support.ui.ISelectindex - The option at this index will be deselectedorg.openqa.selenium.NoSuchElementException - If no matching option elements are foundUnsupportedOperationException - If the SELECT does not support multiple selectionspublic void deselectByVisibleText(String text)
<option value="foo">Bar</option>
deselectByVisibleText in interface org.openqa.selenium.support.ui.ISelecttext - The visible text to match againstorg.openqa.selenium.NoSuchElementException - If no matching option elements are foundUnsupportedOperationException - If the SELECT does not support multiple selectionsCopyright © 2021 JBoss by Red Hat. All rights reserved.