public class SelectImpl extends ElementImpl implements Select
| Constructor and Description |
|---|
SelectImpl(UniqueElementLocator elementLocator)
Wraps a WebElement with checkbox functionality.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deselectAll()
Wraps Selenium's method.
|
void |
deselectByIndex(int index)
Wraps Selenium's method.
|
void |
deselectByValue(java.lang.String value)
Wraps Selenium's method.
|
void |
deselectByVisibleText(java.lang.String text)
Wraps Selenium's method.
|
java.util.List<org.openqa.selenium.WebElement> |
getAllSelectedOptions()
Wraps Selenium's method.
|
org.openqa.selenium.WebElement |
getFirstSelectedOption()
Wraps Selenium's method.
|
java.util.List<org.openqa.selenium.WebElement> |
getOptions()
Wraps Selenium's method.
|
boolean |
isMultiple()
Wraps Selenium's method.
|
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.
|
clear, click, elementWired, findElement, findElements, getAttribute, getCoordinates, getCssValue, getLocation, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, isDisplayed, isEnabled, isSelected, sendKeys, submitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitelementWiredpublic SelectImpl(UniqueElementLocator elementLocator)
elementLocator - the locator of the webelement.public boolean isMultiple()
isMultiple in interface SelectSelect.isMultiple()public void deselectByIndex(int index)
deselectByIndex in interface Selectindex - index to selectSelect.deselectByIndex(int)public void selectByValue(java.lang.String value)
selectByValue in interface Selectvalue - The value to match againstorg.openqa.selenium.NoSuchElementException - If no matching option elements are found
or the elements are not visible or disabled.Select.selectByValue(String)public org.openqa.selenium.WebElement getFirstSelectedOption()
getFirstSelectedOption in interface SelectSelect.getFirstSelectedOption()public void selectByVisibleText(java.lang.String text)
selectByVisibleText in interface Selecttext - The visible text to match againstorg.openqa.selenium.NoSuchElementException - If no matching option elements are found
or the elements are not visible or disabled.Select.selectByVisibleText(String)public void deselectByValue(java.lang.String value)
deselectByValue in interface Selectvalue - value to deselectSelect.deselectByValue(String)public void deselectAll()
deselectAll in interface SelectSelect.deselectAll()public java.util.List<org.openqa.selenium.WebElement> getAllSelectedOptions()
getAllSelectedOptions in interface SelectSelect.getAllSelectedOptions()public java.util.List<org.openqa.selenium.WebElement> getOptions()
getOptions in interface SelectSelect.getOptions()public void deselectByVisibleText(java.lang.String text)
deselectByVisibleText in interface Selecttext - text to deselect by visible textSelect.deselectByVisibleText(String)public void selectByIndex(int index)
selectByIndex in interface Selectindex - The option at this index will be selectedorg.openqa.selenium.NoSuchElementException - If no matching option elements are found
or the elements are not visible or disabled.Select.selectByIndex(int)Copyright © 2017 PPI AG. All rights reserved.