Class AbstractNotificationPreferences
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.platform.notifications.test.po.preferences.AbstractNotificationPreferences
-
- Direct Known Subclasses:
ApplicationPreferences
,EventTypePreferences
public abstract class AbstractNotificationPreferences extends BaseElement
Abstract class for notification preferences.- Since:
- 9.7RC1
- Version:
- $Id: 387d826a45ad36b4821dba31262f2e557dbe2586 $
-
-
Field Summary
Fields Modifier and Type Field Description protected BootstrapSwitch
alertSwitch
protected XWikiWebDriver
driver
protected BootstrapSwitch
emailSwitch
protected org.openqa.selenium.WebElement
webElement
-
Constructor Summary
Constructors Constructor Description AbstractNotificationPreferences(org.openqa.selenium.WebElement webElement, XWikiWebDriver driver)
Construct an AbstractNotificationPreferences.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BootstrapSwitch.State
getAlertState()
BootstrapSwitch.State
getEmailState()
protected abstract BootstrapSwitch
getSwitch(String format)
void
setAlertState(BootstrapSwitch.State state)
Set the state of the alert switch.void
setEmailState(BootstrapSwitch.State state)
Set the state of the email switch.-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Field Detail
-
webElement
protected org.openqa.selenium.WebElement webElement
-
driver
protected XWikiWebDriver driver
-
alertSwitch
protected BootstrapSwitch alertSwitch
-
emailSwitch
protected BootstrapSwitch emailSwitch
-
-
Constructor Detail
-
AbstractNotificationPreferences
public AbstractNotificationPreferences(org.openqa.selenium.WebElement webElement, XWikiWebDriver driver)
Construct an AbstractNotificationPreferences.- Parameters:
webElement
- table body of the applicationdriver
- the web driver
-
-
Method Detail
-
getAlertState
public BootstrapSwitch.State getAlertState()
- Returns:
- the state of the alert switch
-
getEmailState
public BootstrapSwitch.State getEmailState()
- Returns:
- the state of the email switch
-
setAlertState
public void setAlertState(BootstrapSwitch.State state) throws Exception
Set the state of the alert switch.- Parameters:
state
- expected state- Throws:
Exception
- if the state is not valid
-
setEmailState
public void setEmailState(BootstrapSwitch.State state) throws Exception
Set the state of the email switch.- Parameters:
state
- expected state- Throws:
Exception
- if the state is not valid
-
getSwitch
protected abstract BootstrapSwitch getSwitch(String format)
- Parameters:
format
- the format of the notification- Returns:
- the switch associated to the given format
-
-