public class DualDataListComponent extends AbstractVaadinPageComponent
Page object component that contains a list with all available items and a list with selected items
Copyright 2017 (C) by Martin Ganserer
| Modifier and Type | Field and Description |
|---|---|
protected String |
elementId |
protected boolean |
hasSearchField |
static String |
SOURCE_LIST_XPATH |
static String |
TARGET_LIST_XPATH |
AJAX_POLLING_INTERVAL_MILLISECONDS, ATTR_NAME_CLASS, ATTR_NAME_SELECTED, ATTR_NAME_STYLE, ATTR_NAME_VALUE, driver, HTML_LIST_ITEM, ITEM_DELIMITER, logger, NEW_LINE, ROW_OFFSET_X, ROW_OFFSET_Y, testContext| Constructor and Description |
|---|
DualDataListComponent(AbstractPageObject pageObject,
String elementId,
boolean hasSearchField)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
getAvailableItems() |
protected String |
getContainerXPath() |
protected List<String> |
getSelectedItems() |
void |
removeAllSelectedItems()
Remove all selected items
|
void |
searchItems(PageElementTestData testData)
Search for items that can be selected afterwards
|
void |
selectAllItems()
Select all available items
|
void |
selectItems(PageElementTestData testData)
Select items by moving them from the source to the target list
|
void |
validateSelection(PageElementTestData testData)
Validate if all items defined by the given test data object are currently selected
|
createPageObject, waitForPendingAjaxRequestsassertEquals, assertNotNull, assertTrue, delayPageLoad, doubleClickElement, fail, fail, findWebElement, findWebElement, findWebElementByXPath, findWebElementsByXPath, getDriver, getLogger, getTestContext, moveToElement, scrollTo, setInputFieldValue, setLogger, validateInputFieldValue, waitUntilVisiblepublic static final String SOURCE_LIST_XPATH
public static final String TARGET_LIST_XPATH
protected String elementId
protected boolean hasSearchField
public DualDataListComponent(AbstractPageObject pageObject, String elementId, boolean hasSearchField)
pageObject - elementId - hasSearchField - public void searchItems(PageElementTestData testData)
testData - the field's test data object that provides necessary informationAssertionError - if the component doesn't provide a search fieldpublic void selectItems(PageElementTestData testData)
testData - the field's test data object that provides necessary informationAssertionError - if an item could not be selectedpublic void validateSelection(PageElementTestData testData)
testData - the field's test data object that provides necessary informationAssertionError - if both lists are differentpublic void selectAllItems()
public void removeAllSelectedItems()
protected List<String> getSelectedItems()
protected List<String> getAvailableItems()
protected String getContainerXPath()
Copyright © 2019. All rights reserved.