|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.team.fvt.tests.web.WebPageElement
com.ibm.team.fvt.tests.web.WebElementWrapper
com.ibm.team.fvt.tests.web.WebSelectElement
public class WebSelectElement
Class to handle select element.
Select
Constructor Summary | |
---|---|
WebSelectElement(WebElementWrapper parent,
org.openqa.selenium.By selectBy)
|
|
WebSelectElement(WebPage page,
org.openqa.selenium.By selectBy)
|
|
WebSelectElement(WebPage page,
WebBrowserElement element)
|
Method Summary | |
---|---|
void |
deselectAll()
Clear all selected entries. |
java.util.List<WebBrowserElement> |
getAllElements()
Return the select elements list. |
java.util.List<java.lang.String> |
getAllLabels()
Return the select labels list. |
WebBrowserElement |
getOptionElement(java.lang.String option)
Return the WebBrowserElement specified by the option label. |
WebBrowserElement |
getSelectedElement()
Return the selected element. |
java.lang.String |
getText()
Return the label of the selected option. |
boolean |
hasOption(java.lang.String option)
Checks if a specific option is available for selection. |
void |
select(java.lang.String option)
Select the corresponding option using the given text. |
void |
select(java.lang.String option,
ByUtils.ComparisonPattern pattern)
Select the corresponding option using the given text. |
void |
select(java.lang.String option,
int pattern)
Deprecated. Since 5.0.1. Use #select(String, ComparisonPattern) instead. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebSelectElement(WebElementWrapper parent, org.openqa.selenium.By selectBy)
public WebSelectElement(WebPage page, org.openqa.selenium.By selectBy)
public WebSelectElement(WebPage page, WebBrowserElement element)
Method Detail |
---|
public void deselectAll()
public java.util.List<WebBrowserElement> getAllElements()
List
of WebBrowserElement
.public java.util.List<java.lang.String> getAllLabels()
List
of String
.public WebBrowserElement getOptionElement(java.lang.String option)
option
- A String
that represents the option to look for.
WebBrowserElement
identified by the option label specified. Returns null if the element is not found.public WebBrowserElement getSelectedElement()
WebBrowserElement
.public java.lang.String getText()
getText
in class WebElementWrapper
String
.public boolean hasOption(java.lang.String option)
option
- A String
that represents the option to look for.
public void select(java.lang.String option)
option
- The option to select in the list.public void select(java.lang.String option, ByUtils.ComparisonPattern pattern)
option
- The option to select in the list.pattern
- The pattern used for matching text.@Deprecated public void select(java.lang.String option, int pattern)
#select(String, ComparisonPattern)
instead.
option
- The option to select in the list.pattern
- The pattern used for matching text. Currently supported are:
#EQUALS_PATTERN
#STARTS_WITH_PATTERN
#ENDS_WITH_PATTERN
#CONTAINS_PATTERN
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |