public class AemDialog extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DIALOG_XPATH
Xpath expression for selecting the dialog element from the page.
|
static String |
ID_CQ_GEN |
| Constructor and Description |
|---|
AemDialog() |
| Modifier and Type | Method and Description |
|---|---|
AemDialog |
cancel()
Finds the cancel button in the dialog and clicks it.
|
AemDialog |
clickDialogFooterButton(String buttonText)
Clicks button at the bottom of edit Window and expect for dialog to disappear.
|
AemDialog |
clickTab(String label)
Clicks the specified tab in component's Edit Window.
|
AemDialog |
closeIfVisible()
Checks if the dialog is visible.
|
String |
getActiveTabName() |
<T> T |
getField(String tabName,
int widgetIndex,
Class<T> dialogFieldType)
Searches for the field of the given type, located on the given tab, identified by its index.
|
<T> T |
getFieldFromCurrentTab(String label,
Class<T> dialogFieldType)
Searches for the field of the given type by its label, on the current tab.
|
String |
getLabelFromTab(int index)
Finds the dialog tab by its index and returns its name (label).
|
String |
getTitle() |
String |
getValueOfItemInCurrentTab(String label,
Class<?> dialogFieldType)
Gets value from field in current tab with provided label and field type.
|
boolean |
isVisible() |
AemDialog |
ok()
Clicks OK button at the bottom of edit Window.
|
ValidationWindow |
okExpectingValidation()
Clicks OK button at the bottom of edit Window.
|
AemDialog |
open()
Opens the dialog by double-clicking the component.
|
AemDialog |
open(org.openqa.selenium.By clickableArea)
Opens the dialog by double-clicking the component using clickable area.
|
AemDialog |
openByContextMenu()
Opens the dialog by edit option in context menu.
|
AemDialog |
openByContextMenu(org.openqa.selenium.By clickableArea)
Opens the dialog by edit option in context menu using clickable area.
|
AemDialog |
setValueOfItemInCurrentTab(String value,
String label,
Class<?> dialogFieldType)
Finds a field by its label on the current tab and sets the value.
|
public static final String DIALOG_XPATH
public static final String ID_CQ_GEN
public AemDialog open()
public AemDialog open(org.openqa.selenium.By clickableArea)
clickableArea - area to clickpublic AemDialog openByContextMenu()
public AemDialog openByContextMenu(org.openqa.selenium.By clickableArea)
clickableArea - area to clickpublic AemDialog ok()
public AemDialog cancel()
public AemDialog clickTab(String label)
label - Tab's label as seen by the user.public String getTitle()
public ValidationWindow okExpectingValidation()
public String getActiveTabName()
public boolean isVisible()
public AemDialog closeIfVisible()
public <T> T getField(String tabName, int widgetIndex, Class<T> dialogFieldType)
T - dialog field classtabName - Label of the tab where the field is located.widgetIndex - Index of the widget within the given tab.dialogFieldType - Class that represents dialog's field.public <T> T getFieldFromCurrentTab(String label, Class<T> dialogFieldType)
T - dialog field classlabel - field labeldialogFieldType - type of dialog fieldpublic String getLabelFromTab(int index)
index - of the tab (starts from 0)public AemDialog clickDialogFooterButton(String buttonText)
buttonText - button labelpublic AemDialog setValueOfItemInCurrentTab(String value, String label, Class<?> dialogFieldType)
value - field valuelabel - field labeldialogFieldType - type of dialog fieldCopyright © 2016–2018 Cognifide Ltd.. All rights reserved.