public abstract class AbstractViewPageObject extends AbstractPageObject
Abstract base object for all page objects that represent views
Copyright 2017 (C) by Martin Ganserer
| Modifier and Type | Field and Description |
|---|---|
protected DataTableComponent |
dataTable |
BUTTON_ID_LOG_IN, FORM_ID_PREFIXAJAX_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 |
|---|
AbstractViewPageObject(SeleniumTestContext testContext)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
<T extends AbstractPageObject> |
clickContextMenuAdd(Class<T> pageClass)
Click on the context-menu item 'Add'
|
void |
clickContextMenuCopy(org.openqa.selenium.WebElement rowElement)
Click on the context-menu item 'Copy' in order to copy the object that is bound to the given row
|
<T extends AbstractPageObject> |
clickContextMenuCopy(org.openqa.selenium.WebElement rowElement,
Class<T> pageClass)
Click on the context-menu item 'Copy' in order to copy the object that is bound to the given row
|
<T extends AbstractPageObject> |
clickContextMenuCreate(Class<T> pageClass)
Click on the context-menu item 'Create'
|
void |
clickContextMenuDelete(org.openqa.selenium.WebElement rowElement)
Click on the context-menu item 'Delete' in order to delete the object that is bound to the given row
|
void |
clickContextMenuDownload(org.openqa.selenium.WebElement rowElement)
Click on the context-menu item 'Download'
|
void |
clickContextMenuExport()
Click on the context-menu item 'Export'
|
void |
clickContextMenuExport(org.openqa.selenium.WebElement rowElement)
Click on the context-menu item 'Export'
|
void |
clickContextMenuImport()
Click on the context-menu item 'Import'
|
void |
clickContextMenuImport(PageElementTestData testData)
Click on the context-menu item 'Import' and upload the file that is defined in the respective test data object
|
void |
clickContextMenuItem(String elementId)
Open the context-menu and select an item that is identified by the given ID
|
void |
clickContextMenuItem(org.openqa.selenium.WebElement rowElement,
String elementId)
Open the context-menu and select an item that is identified by the given ID
|
<T extends AbstractPageObject> |
clickContextMenuUpdate(org.openqa.selenium.WebElement rowElement,
Class<T> pageClass)
Click on the context-menu item 'Update'
|
<T extends AbstractPageObject> |
clickContextMenuView(org.openqa.selenium.WebElement rowElement,
Class<T> pageClass)
Click on the context-menu item 'View'
|
void |
doubleClickRow(org.openqa.selenium.WebElement rowElement)
Perform a double-click on the given row
|
<T extends AbstractPageObject> |
doubleClickRow(org.openqa.selenium.WebElement rowElement,
Class<T> pageClass)
Perform a double-click on the given row
|
protected org.openqa.selenium.WebElement |
getFirstRow() |
org.openqa.selenium.WebElement |
getPaginatorNext() |
protected String |
getPanelIdPrefix() |
org.openqa.selenium.WebElement |
getRowByCellValue(String cellValue) |
org.openqa.selenium.WebElement |
getRowByCellValue(String cellValue,
boolean skipPagination) |
org.openqa.selenium.WebElement |
getRowByObjectId(String objectId) |
org.openqa.selenium.WebElement |
getRowByObjectId(String objectId,
boolean skipPagination) |
org.openqa.selenium.WebElement |
getRowByRowIndex(int rowIndex) |
int |
getRowCount() |
void |
openContextMenu(org.openqa.selenium.WebElement rowElement)
Open the context-menu
|
void |
pressRefreshButton()
Press the 'Refresh' context-menu item
|
void |
selectRow(org.openqa.selenium.WebElement rowElement)
Select a row
|
void |
validateMaxRowCount(PageElementTestData testData)
Validate if the number of visible rows in the first page of the table component is smaller (or equal) than a given upper limit
|
void |
validateMinRowCount(PageElementTestData testData)
Validate if the number of visible rows in the first page of the table component is greater (or equal) than a given lower limit
|
void |
validateRowCount(PageElementTestData testData)
Validate if the number of visible rows in the first page of the table component is equal to the expected row count
|
buildPageURL, getCheckBoxSelection, open, open, openPageByNavigator, openTabPage, pressBackButton, pressButton, pressLogoutButton, pressSaveButton, pressSaveButton, selectAutoCompleteItem, selectComboboxItem, selectItem, selectLoVItem, setCheckBoxValue, uploadFile, validateAutoCompleteItem, validateCheckBoxValue, validateComboboxItem, validateLabelText, validateLoVItem, validatePageTitle, waitForMessageDialog, waitForNotificationMessagecreatePageObject, waitForPendingAjaxRequestsassertEquals, assertNotNull, assertTrue, delayPageLoad, doubleClickElement, fail, fail, findWebElement, findWebElement, findWebElementByXPath, findWebElementsByXPath, getDriver, getLogger, getTestContext, moveToElement, scrollTo, setInputFieldValue, setLogger, validateInputFieldValue, waitUntilVisibleprotected DataTableComponent dataTable
public AbstractViewPageObject(SeleniumTestContext testContext)
testContext - public void pressRefreshButton()
AssertionError - if the context-menu item could not be foundpublic <T extends AbstractPageObject> T doubleClickRow(org.openqa.selenium.WebElement rowElement, Class<T> pageClass)
T - the type of the page object to be returnedrowElement - pageClass - AssertionError - if the page object either could not be created, or the parameter rowElement is nullpublic void doubleClickRow(org.openqa.selenium.WebElement rowElement)
rowElement - AssertionError - if the parameter rowElement is nullpublic void selectRow(org.openqa.selenium.WebElement rowElement)
rowElement - AssertionError - if the parameter rowElement is nullpublic org.openqa.selenium.WebElement getRowByRowIndex(int rowIndex)
rowIndex - AssertionError - if the row either could not be found, or the row index is smaller than 1public org.openqa.selenium.WebElement getRowByObjectId(String objectId, boolean skipPagination)
objectId - skipPagination - if set to true searching in subsequent pages will be skippedAssertionError - if the parameter objectId is null or emptypublic org.openqa.selenium.WebElement getRowByObjectId(String objectId)
objectId - AssertionError - if the parameter objectId is null or emptypublic org.openqa.selenium.WebElement getRowByCellValue(String cellValue, boolean skipPagination)
cellValue - skipPagination - if set to true searching in subsequent pages will be skippedAssertionError - if the parameter cellValue is null or emptypublic org.openqa.selenium.WebElement getRowByCellValue(String cellValue)
cellValue - AssertionError - if the parameter cellValue is null or emptypublic int getRowCount()
AssertionError - if the table element could not be foundpublic void validateRowCount(PageElementTestData testData)
testData - AssertionError - if the validation either has failed, or the expected row count could not be determinedpublic void validateMinRowCount(PageElementTestData testData)
testData - AssertionError - if the validation either has failed, or the expected row count could not be determinedpublic void validateMaxRowCount(PageElementTestData testData)
testData - AssertionError - if the validation either has failed, or the expected row count could not be determinedpublic org.openqa.selenium.WebElement getPaginatorNext()
public void openContextMenu(org.openqa.selenium.WebElement rowElement)
rowElement - AssertionError - if the context-menu either could not be found, or the parameter rowElement is nullpublic void clickContextMenuItem(org.openqa.selenium.WebElement rowElement,
String elementId)
rowElement - elementId - AssertionError - if the context-menu item either could not be found, or the parameter rowElement is nullpublic void clickContextMenuItem(String elementId)
elementId - AssertionError - if the context-menu item could not be foundpublic void clickContextMenuDelete(org.openqa.selenium.WebElement rowElement)
rowElement - AssertionError - if an element either could not be found, or the parameter rowElement is nullpublic <T extends AbstractPageObject> T clickContextMenuCopy(org.openqa.selenium.WebElement rowElement, Class<T> pageClass)
T - the type of the page object to be returnedrowElement - pageClass - AssertionError - if the page object either could not be created, or an element could not be foundpublic void clickContextMenuCopy(org.openqa.selenium.WebElement rowElement)
rowElement - AssertionError - if an element either could not be found, or the parameter rowElement is nullpublic <T extends AbstractPageObject> T clickContextMenuCreate(Class<T> pageClass)
T - the type of the page object to be returnedpageClass - AssertionError - if the page object either could not be created, or the context-menu item could not be foundpublic <T extends AbstractPageObject> T clickContextMenuAdd(Class<T> pageClass)
T - the type of the page object to be returnedpageClass - AssertionError - if the page object either could not be created, or the context-menu item could not be foundpublic <T extends AbstractPageObject> T clickContextMenuUpdate(org.openqa.selenium.WebElement rowElement, Class<T> pageClass)
T - the type of the page object to be returnedpageClass - rowElement - AssertionError - if the page object either could not be created, or the context-menu item could not be foundpublic <T extends AbstractPageObject> T clickContextMenuView(org.openqa.selenium.WebElement rowElement, Class<T> pageClass)
T - the type of the page object to be returnedpageClass - rowElement - AssertionError - if the page object either could not be created, or the context-menu item could not be foundpublic void clickContextMenuImport()
AssertionError - if the context-menu item could not be foundpublic void clickContextMenuImport(PageElementTestData testData)
testData - the test data object that provides the absolute path to the import fileAssertionError - if an element either could not be found, or test data is invalidpublic void clickContextMenuExport(org.openqa.selenium.WebElement rowElement)
rowElement - AssertionError - if the context-menu item either could not be found, or the parameter rowElement is nullpublic void clickContextMenuExport()
AssertionError - if the context-menu item could not be foundpublic void clickContextMenuDownload(org.openqa.selenium.WebElement rowElement)
rowElement - AssertionError - if the context-menu item either could not be found, or the parameter rowElement is nullprotected String getPanelIdPrefix()
protected org.openqa.selenium.WebElement getFirstRow()
Copyright © 2019. All rights reserved.