public class SeleniumWSelectWebElement extends SeleniumWComponentInputWebElement
| Modifier and Type | Field and Description |
|---|---|
static String |
RO_MULTI_OPTION_TAG
HTML tagName for the options in a multi-select component in a read-only state.
|
static String |
RO_MULTI_SELECT_TAG
HTML tagName for multi-select components in a read-only state.
|
static String |
SELECT_TAG
HTML tagName for select elements.
|
static String |
SELECTOR_FIRST_OPTION
The CSS Selector for the first option.
|
static String |
SELECTOR_LAST_OPTION
The CSS Selector for the last option.
|
static String |
SELECTOR_NTH_OPTION
The CSS Selector for the Nth option.
|
static String |
SELECTOR_SELECTED_OPTION
The CSS Selector for a selected option.
|
EDITABLE_TAG, TOP_LEVEL_TAG| Constructor and Description |
|---|
SeleniumWSelectWebElement(org.openqa.selenium.WebElement element,
org.openqa.selenium.WebDriver driver)
Default constructor for this element.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute(String name)
Some attributes are applied to the wrapper, some to the input.
|
SeleniumWComponentWebElement |
getFirstOption() |
SeleniumWComponentWebElement |
getInputField() |
SeleniumWComponentWebElement |
getLastOption() |
SeleniumWComponentWebElement |
getNthOption(int optionNumber) |
org.openqa.selenium.WebElement |
getOption(String optionText)
Get an option based on its visible text.
|
List<org.openqa.selenium.WebElement> |
getOptions() |
org.openqa.selenium.WebElement |
getSelectedOption() |
List<org.openqa.selenium.WebElement> |
getSelectedOptions() |
String |
getValue() |
boolean |
isMultiSelect()
Is the component a multi-select list?
|
clear, click, clickNoWait, getActiveId, getSuggestionList, isCombo, isEnabled, isMandatory, isReadOnly, sendKeys, sendKeysclickElementNoWait, findElement, findElementImmediate, findElements, findElementsImmediate, getCssValue, getDriver, getElement, getLocation, getRect, getScreenshotAs, getSize, getTagName, getText, getUserContextForSession, isDisplayed, isHidden, isSelected, submit, waitForPageReady, wrapElementpublic static final String SELECTOR_SELECTED_OPTION
public static final String SELECTOR_FIRST_OPTION
public static final String SELECTOR_LAST_OPTION
public static final String SELECTOR_NTH_OPTION
public static final String SELECT_TAG
public static final String RO_MULTI_SELECT_TAG
public static final String RO_MULTI_OPTION_TAG
public SeleniumWSelectWebElement(org.openqa.selenium.WebElement element,
org.openqa.selenium.WebDriver driver)
element - the WebElementdriver - the driver.public String getValue()
getValue in class SeleniumWComponentInputWebElementpublic org.openqa.selenium.WebElement getSelectedOption()
public SeleniumWComponentWebElement getFirstOption()
public SeleniumWComponentWebElement getLastOption()
public SeleniumWComponentWebElement getNthOption(int optionNumber)
optionNumber - - thepublic String getAttribute(String name)
getAttribute in interface org.openqa.selenium.WebElementgetAttribute in class SeleniumWComponentInputWebElementname - the name of the attribute to findpublic SeleniumWComponentWebElement getInputField()
getInputField in class SeleniumWComponentInputWebElementpublic boolean isMultiSelect()
true if the component is a multi-selectpublic List<org.openqa.selenium.WebElement> getOptions()
public List<org.openqa.selenium.WebElement> getSelectedOptions()
public org.openqa.selenium.WebElement getOption(String optionText)
optionText - the text of the option we are trying to findCopyright © 2018. All rights reserved.