public class SelectElement extends RunOnFailureKeywordsAdapter
| Modifier and Type | Field and Description |
|---|---|
protected Element |
element
Instantiated Element keyword bean
|
protected Logging |
logging
Instantiated Logging keyword bean
|
| Constructor and Description |
|---|
SelectElement() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
getLabelsForOptions(List<org.openqa.selenium.WebElement> options) |
List<String> |
getListItems(String locator)
Returns the values in the select list identified by locator.
|
String |
getSelectedListLabel(String locator)
Returns the visible label of the first selected element from the select
list identified by locator.
|
List<String> |
getSelectedListLabels(String locator)
Returns the visible labels of the first selected elements as a list from
the select list identified by locator.
|
String |
getSelectedListValue(String locator)
Returns the value of the first selected element from the select list
identified by locator.
|
List<String> |
getSelectedListValues(String locator)
Returns the values of the first selected elements as a list from the
select list identified by locator.
|
protected org.openqa.selenium.support.ui.Select |
getSelectList(String locator) |
protected List<org.openqa.selenium.WebElement> |
getSelectListOptions(org.openqa.selenium.support.ui.Select select) |
protected List<org.openqa.selenium.WebElement> |
getSelectListOptions(String locator) |
protected List<org.openqa.selenium.WebElement> |
getSelectListOptionsSelected(String locator) |
protected List<String> |
getValuesForOptions(List<org.openqa.selenium.WebElement> options) |
protected boolean |
isMultiselectList(org.openqa.selenium.support.ui.Select select) |
void |
listSelectionShouldBe(String locator,
String... items)
Verify the selection of the select list identified by locatoris
exactly *items.
|
void |
listShouldHaveNoSelections(String locator)
Verify the select list identified by locatorhas no selections.
|
void |
pageShouldContainList(String locator) |
void |
pageShouldContainList(String locator,
String message) |
void |
pageShouldContainList(String locator,
String message,
String logLevel)
Verify the select list identified by locator is found on the
current page.
|
void |
pageShouldNotContainList(String locator) |
void |
pageShouldNotContainList(String locator,
String message) |
void |
pageShouldNotContainList(String locator,
String message,
String logLevel)
Verify the select list identified by locator is not found on the
current page.
|
void |
selectAllFromList(String locator)
Select all values of the multi-select list identified by locator.
|
void |
selectFromList(String locator,
String... items)
Select the given *items of the multi-select list identified by
locator.
|
void |
selectFromListByIndex(String locator,
String... indexes)
Select the given *indexes of the multi-select list identified by
locator.
|
void |
selectFromListByLabel(String locator,
String... labels)
Select the given *labels of the multi-select list identified by
locator.
|
void |
selectFromListByValue(String locator,
String... values)
Select the given *values of the multi-select list identified by
locator.
|
void |
unselectFromList(String locator,
String... items)
Unselect the given *items of the multi-select list identified by
locator.
|
void |
unselectFromListByIndex(String locator,
Integer... indexes)
Unselect the given *indexes of the multi-select list identified by
locator.
|
void |
unselectFromListByLabel(String locator,
String... labels)
Unselect the given *labels of the multi-select list identified by
locator.
|
void |
unselectFromListByValue(String locator,
String... values)
Unselect the given *values of the multi-select list identified by
locator.
|
runOnFailureByAspectJprotected Element element
protected Logging logging
public List<String> getListItems(String locator)
locator - The locator to locate the select list.public String getSelectedListLabel(String locator)
locator - The locator to locate the select list.public List<String> getSelectedListLabels(String locator)
locator - The locator to locate the select list.public String getSelectedListValue(String locator)
locator - The locator to locate the select list.public List<String> getSelectedListValues(String locator)
locator - The locator to locate the select list.public void listSelectionShouldBe(String locator, String... items)
locator - The locator to locate the select list.items - The list of items to verifypublic void listShouldHaveNoSelections(String locator)
locator - The locator to locate the select list.public void pageShouldContainList(String locator)
public void pageShouldContainList(String locator, String message, String logLevel)
locator - The locator to locate the select list.message - Default=NONE. Optional custom error message.logLevel - Default=INFO. Optional log level.public void pageShouldNotContainList(String locator)
public void pageShouldNotContainList(String locator, String message, String logLevel)
locator - The locator to locate the select list.message - Default=NONE. Optional custom error message.logLevel - Default=INFO. Optional log level.public void selectAllFromList(String locator)
locator - The locator to locate the multi-select list.public void selectFromList(String locator, String... items)
locator - The locator to locate the multi-select list.items - The list of items to selectpublic void selectFromListByIndex(String locator, String... indexes)
locator - The locator to locate the multi-select list.indexes - The list of indexes to selectpublic void selectFromListByValue(String locator, String... values)
locator - The locator to locate the multi-select list.values - The list of values to selectpublic void selectFromListByLabel(String locator, String... labels)
locator - The locator to locate the multi-select list.labels - The list of labels to selectpublic void unselectFromList(String locator, String... items)
locator - The locator to locate the multi-select list.items - The list of items to selectpublic void unselectFromListByIndex(String locator, Integer... indexes)
locator - The locator to locate the multi-select list.indexes - The list of indexes to selectpublic void unselectFromListByValue(String locator, String... values)
locator - The locator to locate the multi-select list.values - The list of values to selectpublic void unselectFromListByLabel(String locator, String... labels)
locator - The locator to locate the multi-select list.labels - The list of labels to selectprotected List<String> getLabelsForOptions(List<org.openqa.selenium.WebElement> options)
protected org.openqa.selenium.support.ui.Select getSelectList(String locator)
protected List<org.openqa.selenium.WebElement> getSelectListOptions(org.openqa.selenium.support.ui.Select select)
protected List<org.openqa.selenium.WebElement> getSelectListOptions(String locator)
protected List<org.openqa.selenium.WebElement> getSelectListOptionsSelected(String locator)
protected List<String> getValuesForOptions(List<org.openqa.selenium.WebElement> options)
protected boolean isMultiselectList(org.openqa.selenium.support.ui.Select select)
Copyright © 2014. All rights reserved.