public class NotificationsTrayPage extends ViewPage
Constructor and Description |
---|
NotificationsTrayPage()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areNotificationsAvailable()
Test if the text "No notification available!" is displayed in the notification tray.
|
boolean |
arePageAndChildrenWatched() |
void |
clearAllNotifications()
Click the button «Clear All» in the notification tray.
|
String |
getNotificationContent(int notificationNumber)
Get the content of a notification.
|
String |
getNotificationDescription(int notificationNumber)
Get the description of a notification.
|
String |
getNotificationPage(int notificationNumber)
Get the page concerned by a notification (if any).
|
String |
getNotificationRawContent(int notificationNumber)
Get the raw content of a notification.
|
NotificationsRSS |
getNotificationRSS(String username,
String password) |
org.openqa.selenium.WebElement |
getNotificationsButton() |
int |
getNotificationsCount()
Get the number of available notifications.
|
int |
getNotificationsListCount()
Get the number of notifications displayed.
|
String |
getNotificationType(int notificationNumber)
Get the type of notification (bold text before notification content).
|
int |
getReadNotificationsCount()
Get the number of read notifications.
|
int |
getUnreadNotificationsCount()
Get the number of unread notifications.
|
boolean |
isMenuOpen() |
boolean |
isNotificationMenuVisible() |
boolean |
isPageOnlyWatched() |
boolean |
isWikiWatched() |
void |
markAsRead(int notificationNumber)
Mark a notification as read.
|
void |
setPageAndChildrenWatchedState(boolean watched)
Watch or unwatch the current "space".
|
void |
setPageOnlyWatchedState(boolean watched)
Watch or unwatch the current page.
|
void |
setWikiWatchedState(boolean watched)
Watch or unwatch the current wiki.
|
void |
showNotificationTray()
Ensure that the notifications tray is visible.
|
static void |
waitOnNotificationCount(String userId,
String wiki,
int expectedUnread)
Wait until the given number of unread notification is received.
|
static void |
waitOnNotificationCount(String userId,
String wiki,
int expectedUnread,
int timeout)
Wait until the given number of unread notification is received.
|
clickBreadcrumbLink, clickWantedLink, clickWantedLink, contentContainsElement, editSection, exists, getBreadcrumb, getBreadcrumbContent, getContent, getPageBackgroundColor, getTitleColor, getTitleFontFamily, getTranslateButton, hasBreadcrumbContent, hasBreadcrumbContent, hasTranslateButton, isInlinePage, openAttachmentsDocExtraPane, openCommentsDocExtraPane, openHistoryDocExtraPane, openInformationDocExtraPane, scrollToTop, useShortcutKeyForAttachmentPane, useShortcutKeyForCommentPane, useShortcutKeyForHistoryPane, useShortcutKeyForInformationPane, waitForDocExtraPaneActive, waitUntilContent
canDelete, clickAdminActionsSubMenuEntry, clickEditSubMenuEntry, clickLocale, clickMoreActionsSubMenuEntry, copy, createInlinePage, createPage, delete, deletePage, edit, editClass, editInline, editObjects, editRights, editWiki, editWYSIWYG, getCurrentUser, getDocumentTitle, getEditURL, getErrorContent, getHTMLMetaDataValue, getLocales, getMetaDataValue, getPageTitle, getPageURL, hasLeftPanel, hasLoginLink, hasNotificationsMenu, hasRenderingError, hideDrawer, isAuthenticated, isDrawerVisible, isForbidden, isNewDocument, isNotificationsMenuOpen, login, logout, register, rename, sendKeys, showDrawer, toggleActionMenu, toggleDrawer, toggleNotificationsMenu, useShortcutKeyForClassEditing, useShortcutKeyForEditing, useShortcutKeyForInlineEditing, useShortcutKeyForObjectEditing, useShortcutKeyForPageDeletion, useShortcutKeyForPageRenaming, useShortcutKeyForRightsEditing, useShortcutKeyForSourceViewer, useShortcutKeyForWikiEditing, useShortcutKeyForWysiwygEditing, viewChildren, waitUntilPageIsLoaded, watchDocument, watchSpace, watchWiki
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageJSIsLoaded
public static void waitOnNotificationCount(String userId, String wiki, int expectedUnread)
userId
- the serialized user reference for which to get notificationswiki
- the wiki on which to get notificationsexpectedUnread
- the number of expected unread notifications to wait forpublic static void waitOnNotificationCount(String userId, String wiki, int expectedUnread, int timeout)
userId
- the serialized user reference for which to get notificationswiki
- the wiki on which to get notificationsexpectedUnread
- the number of expected unread notifications to wait fortimeout
- the time delay in seconds before stopping the notifications countpublic boolean isMenuOpen()
public boolean isNotificationMenuVisible()
true
only if the notification menu icon (small bell) is displayed.public boolean areNotificationsAvailable()
public int getNotificationsCount()
public void clearAllNotifications()
public void showNotificationTray()
public int getUnreadNotificationsCount()
public int getReadNotificationsCount()
public int getNotificationsListCount()
public String getNotificationType(int notificationNumber)
notificationNumber
- index of the notification in the listpublic String getNotificationContent(int notificationNumber)
notificationNumber
- index of the notification in the listpublic String getNotificationPage(int notificationNumber)
notificationNumber
- index of the notification in the listpublic String getNotificationDescription(int notificationNumber)
notificationNumber
- index of the notification in the listpublic String getNotificationRawContent(int notificationNumber)
notificationNumber
- index of the notification in the listpublic void markAsRead(int notificationNumber)
notificationNumber
- index of the notification in the listpublic boolean isPageOnlyWatched()
public boolean arePageAndChildrenWatched()
public boolean isWikiWatched()
public void setPageOnlyWatchedState(boolean watched) throws Exception
watched
- the desired stateException
- if the expected state cannot be setpublic void setPageAndChildrenWatchedState(boolean watched) throws Exception
watched
- the desired stateException
- if the expected state cannot be setpublic void setWikiWatchedState(boolean watched) throws Exception
watched
- the desired stateException
- if the expected state cannot be setpublic NotificationsRSS getNotificationRSS(String username, String password)
username
- name of the current userpassword
- password of the current userpublic org.openqa.selenium.WebElement getNotificationsButton()
Copyright © 2004–2021 XWiki. All rights reserved.