org.aludratest.service.gui.web.selenium.selenium2.condition
Class AnyDropDownOptions

java.lang.Object
  extended by org.aludratest.service.gui.web.selenium.selenium2.condition.AnyDropDownOptions
All Implemented Interfaces:
com.google.common.base.Function<org.openqa.selenium.WebDriver,String[]>, org.openqa.selenium.support.ui.ExpectedCondition<String[]>

public class AnyDropDownOptions
extends Object
implements org.openqa.selenium.support.ui.ExpectedCondition<String[]>

Collects specific property values of all options of a drop down box. If one of the internal checks fails, the failure message is reported in the message property.

Author:
Volker Bergmann

Field Summary
static String DROPDOWN_OPTION_LABEL_PROPERTY
          constant for an HTML option's 'text' property, a.k.a.
static String DROPDOWN_OPTION_VALUE_PROPERTY
          constant for an HTML option's 'value' property.
 
Constructor Summary
AnyDropDownOptions(GUIElementLocator dropDownLocator, String propertyName, LocatorSupport locatorSupport)
          Constructor.
 
Method Summary
 String[] apply(org.openqa.selenium.WebDriver driver)
           
static AnyDropDownOptions createLabelCondition(GUIElementLocator dropDownLocator, LocatorSupport locatorSupport)
          Creates an instance that provides the options' labels.
static AnyDropDownOptions createValueCondition(GUIElementLocator dropDownLocator, LocatorSupport locatorSupport)
          Creates an instance that provides the options' value contents.
 GUIElementLocator getDropDownLocator()
           
 String getMessage()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Field Detail

DROPDOWN_OPTION_VALUE_PROPERTY

public static final String DROPDOWN_OPTION_VALUE_PROPERTY
constant for an HTML option's 'value' property.

See Also:
Constant Field Values

DROPDOWN_OPTION_LABEL_PROPERTY

public static final String DROPDOWN_OPTION_LABEL_PROPERTY
constant for an HTML option's 'text' property, a.k.a. 'label' value.

See Also:
Constant Field Values
Constructor Detail

AnyDropDownOptions

public AnyDropDownOptions(GUIElementLocator dropDownLocator,
                          String propertyName,
                          LocatorSupport locatorSupport)
Constructor.

Parameters:
dropDownLocator -
propertyName -
locatorSupport -
Method Detail

getDropDownLocator

public GUIElementLocator getDropDownLocator()
Returns:
the dropDownLocator

getMessage

public String getMessage()
Returns:
the message which has been set if the condition did not match

apply

public String[] apply(org.openqa.selenium.WebDriver driver)
Specified by:
apply in interface com.google.common.base.Function<org.openqa.selenium.WebDriver,String[]>

createLabelCondition

public static AnyDropDownOptions createLabelCondition(GUIElementLocator dropDownLocator,
                                                      LocatorSupport locatorSupport)
Creates an instance that provides the options' labels.

Parameters:
dropDownLocator -
locatorSupport -
Returns:

createValueCondition

public static AnyDropDownOptions createValueCondition(GUIElementLocator dropDownLocator,
                                                      LocatorSupport locatorSupport)
Creates an instance that provides the options' value contents.

Parameters:
dropDownLocator -
locatorSupport -
Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 aludratest.org. All rights reserved.