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_INAJAX_POLLING_INTERVAL_MILLISECONDS, ATTR_NAME_CLASS, ATTR_NAME_SELECTED, ATTR_NAME_STYLE, 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> |
clickButtonCreateNew(Class<T> pageClass)
Click on the button 'Create new'
|
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
|
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 data'
|
void |
clickContextMenuExport(org.openqa.selenium.WebElement rowElement)
Click on the context-menu item 'Export data'
|
void |
clickContextMenuImport()
Click on the context-menu item 'Import data'
|
void |
clickContextMenuImport(PageElementTestData testData)
Click on the context-menu item 'Import data' and upload the file that is defined in the respective test data object
|
void |
clickContextMenuItem(String label)
Open the context-menu and select an item that is identified by the given label
|
void |
clickContextMenuItem(org.openqa.selenium.WebElement rowElement,
String label)
Open the context-menu and select an item that is identified by the given label
|
<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
|
org.openqa.selenium.WebElement |
getRowByCellValue(String cellValue) |
org.openqa.selenium.WebElement |
getRowByCellValue(String cellValue,
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' button in the toolbar
|
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, canScroll, open, open, openPageByNavigator, openTabPage, pressButton, pressCancelButton, pressLogoutButton, pressSaveButton, pressSaveButton, searchAndSelectItem, searchItem, selectAutoCompleteItem, selectComboboxItem, selectLoVItem, setCheckBoxValue, setDateFieldValue, uploadFile, validateAutoCompleteItem, validateCheckBoxValue, validateComboboxItem, validateDateFieldValue, validateInternalLinkText, validateLabelText, validateLoVItem, validatePageTitle, waitForMessageDialogcreatePageObject, 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 button 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 getRowByCellValue(String cellValue)
cellValue - AssertionError - if the parameter cellValue 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 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 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 label)
rowElement - label - AssertionError - if the context-menu item either could not be found, or the parameter rowElement is nullpublic void clickContextMenuItem(String label)
label - 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 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 nullpublic <T extends AbstractPageObject> T clickButtonCreateNew(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 button could not be foundCopyright © 2019. All rights reserved.