org.aludratest.service.gui.component
Interface Dropdownbox

All Superinterfaces:
Element<Dropdownbox>, GUIComponent
All Known Implementing Classes:
DropdownboxImpl

public interface Dropdownbox
extends Element<Dropdownbox>

Represents a dropdownbox in a GUI.

Author:
Joerg Langnickel, Volker Bergmann

Method Summary
 void assertContainsLabels(String... labels)
          Verifies that this Dropdownbox has the given labels (and possibly more than these).
 void assertHasLabels(String... labels)
          Checks if this Dropdownbox has the expected labels.
 void assertHasValues(String... values)
          Verifies that this Dropdownbox has the passed through values (and only these).
 void assertIsSelected(String label)
          Verifies that the passed label is selected in this Dropdownbox.
 void assertSelectedContains(String label)
          Verifies that the passed text is part of the currently selected label in this Dropdownbox.
 void assertSelectedIgnoreCaseTrimmed(String label)
          Verifies that the passed label is selected in this Dropdownbox.
 void assertSelectionMatches(org.databene.commons.Validator<String> validator)
          Asserts that the selection matches the provided Validator.
 void assertTextNotEquals(String label)
          Verifies that the passed label is not selected in this Dropdownbox.
 boolean checkContainsLabels(String... labels)
          Checks if this Dropdownbox has the given labels (and possibly more than these).
 boolean checkEqualsLabels(String... labels)
          Checks if this Dropdownbox has ONLY the given labels - in the order as speficied.
 String getSelectedEntry()
          Reads the selected value and returns it as a String.
 String getSelectedLabel()
          Reads the selected label and returns it as a String.
 void selectEntry(OptionLocator optionLocator)
          Selects an entry of a Dropdownbox by its locator, which must be either a LabelLocator or an IndexLocator.
 void selectEntry(String label)
          Selects an entry of this Dropdownbox by its label.
 
Methods inherited from interface org.aludratest.service.gui.component.Element
assertEnabled, assertFocus, assertNotEnabled, assertNotPresent, assertPresent, assertVisible, click, click, doubleClick, focus, getLocator, isEnabled, isEnabled, isNotPresent, isNotPresent, isPresent, isPresent, isPresentAndInForeground, isVisible, isVisible, waitingUntilTaskCompletion, waitingUntilTaskCompletion
 

Method Detail

selectEntry

void selectEntry(String label)
Selects an entry of this Dropdownbox by its label. If the label is null or marked as null, the operation is not executed. It the label is marked as empty, it will be replaced with "".

Parameters:
label - Label of the entry to select.

selectEntry

void selectEntry(OptionLocator optionLocator)
Selects an entry of a Dropdownbox by its locator, which must be either a LabelLocator or an IndexLocator.

Parameters:
optionLocator - is a LabelLocator or IndexLocator for identifying the entry to select. If null, no action is performed.

getSelectedEntry

String getSelectedEntry()
Reads the selected value and returns it as a String.

Returns:
the value of the selected entry

getSelectedLabel

String getSelectedLabel()
Reads the selected label and returns it as a String.

Returns:
the label of the selected entry

assertIsSelected

void assertIsSelected(String label)
Verifies that the passed label is selected in this Dropdownbox. If the label is null or marked as null the operation is not executed. If the label is marked as empty it will be replaced with ""

Parameters:
label - Label to check the currently selected label against.

assertTextNotEquals

void assertTextNotEquals(String label)
Verifies that the passed label is not selected in this Dropdownbox. If the label is null or marked as null the operation is not executed. If the label is marked as empty it will be replaced with ""

Parameters:
label - Label to check the currently selected label against.

assertSelectedContains

void assertSelectedContains(String label)
Verifies that the passed text is part of the currently selected label in this Dropdownbox. If the label is null or marked as null the operation is not executed.

Parameters:
label - Label to check the currently selected label against.

assertSelectedIgnoreCaseTrimmed

void assertSelectedIgnoreCaseTrimmed(String label)
Verifies that the passed label is selected in this Dropdownbox. If the label is null or marked as null the operation is not executed. If the label is marked as empty it will be replaced with "". Differences in case, leading or trailing whitespace are ignored.

Parameters:
label - Label to check the currently selected label against.

assertSelectionMatches

void assertSelectionMatches(org.databene.commons.Validator<String> validator)
Asserts that the selection matches the provided Validator.

Parameters:
validator - the validator to apply for verification

assertHasValues

void assertHasValues(String... values)
Verifies that this Dropdownbox has the passed through values (and only these). If only one value is passed and it is null or marked as null, the operation will not be executed.

Parameters:
values - Values to check the values of this Dropdownbox against.

assertHasLabels

void assertHasLabels(String... labels)
Checks if this Dropdownbox has the expected labels. The check fails if: If only one label is passed and it is null or marked as null, the operation will not be executed.

Parameters:
labels - which should be checked

assertContainsLabels

void assertContainsLabels(String... labels)
Verifies that this Dropdownbox has the given labels (and possibly more than these). If only one value is passed and it is null or marked as null, the operation will not be executed.

Parameters:
labels - Labels to check the labels of this Dropdownbox against.

checkContainsLabels

boolean checkContainsLabels(String... labels)
Checks if this Dropdownbox has the given labels (and possibly more than these).

Parameters:
labels - Labels to check the labels of this Dropdownbox against.
Returns:
true if the checkbox contains the given labels, false otherwise.

checkEqualsLabels

boolean checkEqualsLabels(String... labels)
Checks if this Dropdownbox has ONLY the given labels - in the order as speficied.

Parameters:
labels - Labels to check the labels of this Dropdownbox against.
Returns:
true if the checkbox only contains the given labels, false otherwise.


Copyright © 2015 aludratest.org. All rights reserved.