com.ibm.team.fvt.tests.web
Class WebSelectElement

java.lang.Object
  extended by com.ibm.team.fvt.tests.web.WebPageElement
      extended by com.ibm.team.fvt.tests.web.WebElementWrapper
          extended by com.ibm.team.fvt.tests.web.WebSelectElement

public class WebSelectElement
extends WebElementWrapper

Class to handle select element.

See Also:
Select

Constructor Summary
WebSelectElement(WebElementWrapper parent, org.openqa.selenium.By selectBy)
           
WebSelectElement(WebPage page, org.openqa.selenium.By selectBy)
           
 
Method Summary
 java.util.List<WebBrowserElement> getAllElements()
          Return the select elements list.
 WebBrowserElement getSelectedElement()
          Return the selected element.
 void select(java.lang.String option)
          Select the corresponding option using the given text.
 void select(java.lang.String option, int pattern)
          Select the corresponding option using the given text.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSelectElement

public WebSelectElement(WebPage page,
                        org.openqa.selenium.By selectBy)

WebSelectElement

public WebSelectElement(WebElementWrapper parent,
                        org.openqa.selenium.By selectBy)
Method Detail

getAllElements

public java.util.List<WebBrowserElement> getAllElements()
Return the select elements list.

Returns:
The list of option as a List of WebBrowserElement.

getSelectedElement

public WebBrowserElement getSelectedElement()
Return the selected element.

Returns:
The first selected option as a WebBrowserElement.

select

public void select(java.lang.String option)
Select the corresponding option using the given text.

Parameters:
option - The option to select in the list.

select

public void select(java.lang.String option,
                   int pattern)
Select the corresponding option using the given text.

Parameters:
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