Package org.xwiki.test.ui.po
Class ViewPage
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.BasePage
-
- org.xwiki.test.ui.po.ViewPage
-
- Direct Known Subclasses:
AttachmentHistoryPage
,ComparePage
,ConfirmationPage
,CopyOverwritePromptPage
,CopyPage
,CreatePagePage
,DeletePageOutcomePage
,InlinePage
,LoginPage
,RenamePage
public class ViewPage extends BasePage
Represents the common actions possible on all Pages when using the "view" action.- Since:
- 3.2M3
- Version:
- $Id: 0a3c21a1f6cde40caeedf4ee9d64abbaa102ca96 $
-
-
Constructor Summary
Constructors Constructor Description ViewPage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ViewPage
clickBreadcrumbLink(String linkText)
Clicks on the breadcrumb link with the given text.void
clickWantedLink(String spaceName, String pageName, boolean waitForTemplateDisplay)
Clicks on a wanted link in the page.void
clickWantedLink(org.xwiki.model.reference.EntityReference reference, boolean waitForTemplateDisplay)
Clicks on a wanted link in the page.boolean
contentContainsElement(org.openqa.selenium.By elementLocator)
WYSIWYGEditPage
editSection(int sectionNumber)
boolean
exists()
BreadcrumbElement
getBreadcrumb()
String
getBreadcrumbContent()
String
getContent()
String
getPageBackgroundColor()
String
getTitleColor()
String
getTitleFontFamily()
org.openqa.selenium.WebElement
getTranslateButton()
boolean
hasBreadcrumbContent(String breadcrumbItem, boolean isCurrent)
boolean
hasBreadcrumbContent(String breadcrumbItem, boolean isCurrent, boolean withLink)
boolean
hasTranslateButton()
boolean
isInlinePage()
CommentsTab
openCommentsDocExtraPane()
Opens the comments tab.HistoryPane
openHistoryDocExtraPane()
InformationPane
openInformationDocExtraPane()
void
scrollToTop()
Instantaneously scrolls to the top of the screen.protected void
useShortcutForDocExtraPane(String shortcut, String pane)
CommentsTab
useShortcutKeyForCommentPane()
HistoryPane
useShortcutKeyForHistoryPane()
InformationPane
useShortcutKeyForInformationPane()
void
waitForDocExtraPaneActive(String paneId)
void
waitUntilContent(String expectedValue)
Waits until the page has the passed content by refreshing the page-
Methods inherited from class org.xwiki.test.ui.po.BasePage
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, reloadPage, rename, sendKeys, showDrawer, toggleActionMenu, toggleDrawer, toggleNotificationsMenu, useShortcutKeyForClassEditing, useShortcutKeyForEditing, useShortcutKeyForInlineEditing, useShortcutKeyForObjectEditing, useShortcutKeyForPageDeletion, useShortcutKeyForPageRenaming, useShortcutKeyForRightsEditing, useShortcutKeyForSourceViewer, useShortcutKeyForWikiEditing, useShortcutKeyForWysiwygEditing, viewChildren, watchDocument, watchSpace, watchWiki
-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
openCommentsDocExtraPane
public CommentsTab openCommentsDocExtraPane()
Opens the comments tab.- Returns:
- element for controlling the comments tab
-
openHistoryDocExtraPane
public HistoryPane openHistoryDocExtraPane()
-
openInformationDocExtraPane
public InformationPane openInformationDocExtraPane()
-
exists
public boolean exists()
- Returns:
- does this page exist.
-
getContent
public String getContent()
- Returns:
- the page's main content as text (no HTML)
-
editSection
public WYSIWYGEditPage editSection(int sectionNumber)
-
getTranslateButton
public org.openqa.selenium.WebElement getTranslateButton()
- Returns:
- the "Translate" page button; use this only if you expect the button to be present
- Since:
- 12.10.6, 13.2RC1
-
hasTranslateButton
public boolean hasTranslateButton()
- Returns:
true
if the "Translate" page button is present,false
otherwise- Since:
- 12.10.6, 13.2RC1
-
clickWantedLink
public void clickWantedLink(String spaceName, String pageName, boolean waitForTemplateDisplay)
Clicks on a wanted link in the page.
-
clickWantedLink
public void clickWantedLink(org.xwiki.model.reference.EntityReference reference, boolean waitForTemplateDisplay)
Clicks on a wanted link in the page.- Since:
- 7.2M2
-
getBreadcrumb
public BreadcrumbElement getBreadcrumb()
-
getBreadcrumbContent
public String getBreadcrumbContent()
-
hasBreadcrumbContent
public boolean hasBreadcrumbContent(String breadcrumbItem, boolean isCurrent)
-
hasBreadcrumbContent
public boolean hasBreadcrumbContent(String breadcrumbItem, boolean isCurrent, boolean withLink)
-
clickBreadcrumbLink
public ViewPage clickBreadcrumbLink(String linkText)
Clicks on the breadcrumb link with the given text.- Parameters:
linkText
- the link text- Returns:
- the target of the breadcrumb link
-
isInlinePage
public boolean isInlinePage()
-
waitForDocExtraPaneActive
public void waitForDocExtraPaneActive(String paneId)
- Parameters:
paneId
- valid values: "history", "comments", etc
-
waitUntilContent
public void waitUntilContent(String expectedValue)
Waits until the page has the passed content by refreshing the page- Parameters:
expectedValue
- the content value to wait for (in regex format)- Since:
- 4.0M1
-
contentContainsElement
public boolean contentContainsElement(org.openqa.selenium.By elementLocator)
- Parameters:
elementLocator
- the element to locate in the content of the page.- Returns:
- true if the content of the page contains the element
- Since:
- 11.5RC1
-
scrollToTop
public void scrollToTop()
Instantaneously scrolls to the top of the screen.- Since:
- 13.3RC1, 12.10.7
-
useShortcutKeyForHistoryPane
public HistoryPane useShortcutKeyForHistoryPane()
-
useShortcutKeyForCommentPane
public CommentsTab useShortcutKeyForCommentPane()
-
useShortcutKeyForInformationPane
public InformationPane useShortcutKeyForInformationPane()
-
getTitleColor
public String getTitleColor()
-
getPageBackgroundColor
public String getPageBackgroundColor()
-
getTitleFontFamily
public String getTitleFontFamily()
-
-