Package org.xwiki.test.ui.po
Class InlinePage
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.BasePage
-
- org.xwiki.test.ui.po.ViewPage
-
- org.xwiki.test.ui.po.InlinePage
-
public class InlinePage extends ViewPage
Represents the common actions possible on all Pages when using the "inline" action.- Since:
- 3.2M3
- Version:
- $Id: cd3e39a8b5be5d94d54eb8d27387f0ff1b8cc5f2 $
-
-
Constructor Summary
Constructors Constructor Description InlinePage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends ViewPage>
TclickCancel()
void
clickPreview()
void
clickSaveAndContinue()
void
clickSaveAndContinue(boolean wait)
Clicks on the Save and Continue button.<T extends ViewPage>
TclickSaveAndView()
void
clickSaveAndView(boolean wait)
Useful when the save and view operation could fail on the client side and a reload (the view part) might thus not take place.protected <T extends ViewPage>
TcreateViewPage()
Can be overridden to return extendedViewPage
.String
getContent()
org.openqa.selenium.WebElement
getForm()
org.openqa.selenium.By
getFormLocator()
org.openqa.selenium.WebElement
getSaveAndContinueButton()
Use this method instead ofclickSaveAndContinue()
and callWebElement.click()
when you know that the next page is not a standard XWikiInlinePage
.org.openqa.selenium.WebElement
getSaveAndViewButton()
Use this method instead ofclickSaveAndView()
and callWebElement.click()
when you know that the next page is not a standard XWikiInlinePage
.String
getValue(String fieldName)
Retrieves the value of the specified form fieldvoid
setValue(String fieldName, String fieldValue)
Sets the value of the specified form field-
Methods inherited from class org.xwiki.test.ui.po.ViewPage
clickBreadcrumbLink, clickWantedLink, clickWantedLink, contentContainsElement, editSection, exists, getBreadcrumb, getBreadcrumbContent, getLastModifiedText, getPageBackgroundColor, getTitleColor, getTitleFontFamily, getTranslateButton, hasBreadcrumbContent, hasBreadcrumbContent, hasTranslateButton, isInlinePage, openCommentsDocExtraPane, openHistoryDocExtraPane, openInformationDocExtraPane, scrollToTop, useShortcutForDocExtraPane, useShortcutKeyForCommentPane, useShortcutKeyForHistoryPane, useShortcutKeyForInformationPane, waitForDocExtraPaneActive, waitUntilContent
-
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, getXWikiMessageContent, 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
-
clickPreview
public void clickPreview()
-
clickSaveAndContinue
public void clickSaveAndContinue()
-
clickSaveAndContinue
public void clickSaveAndContinue(boolean wait)
Clicks on the Save and Continue button. Use this instead ofclickSaveAndContinue()
when you want to wait for a different message (e.g. an error message).- Parameters:
wait
-true
to wait for the page to be saved,false
otherwise
-
getSaveAndContinueButton
public org.openqa.selenium.WebElement getSaveAndContinueButton()
Use this method instead ofclickSaveAndContinue()
and callWebElement.click()
when you know that the next page is not a standard XWikiInlinePage
.- Returns:
- the save and continue button used to submit the form.
-
clickSaveAndView
public <T extends ViewPage> T clickSaveAndView()
-
clickSaveAndView
public void clickSaveAndView(boolean wait)
Useful when the save and view operation could fail on the client side and a reload (the view part) might thus not take place.- Parameters:
wait
-true
to wait for the page to be saved and reloaded,false
otherwise- Since:
- 7.4M2
-
getSaveAndViewButton
public org.openqa.selenium.WebElement getSaveAndViewButton()
Use this method instead ofclickSaveAndView()
and callWebElement.click()
when you know that the next page is not a standard XWikiInlinePage
.- Returns:
- the save and view button used to submit the form.
-
clickCancel
public <T extends ViewPage> T clickCancel()
-
createViewPage
protected <T extends ViewPage> T createViewPage()
Can be overridden to return extendedViewPage
.
-
getContent
public String getContent()
- Overrides:
getContent
in classViewPage
- Returns:
- the page's main content as text (no HTML)
-
getForm
public org.openqa.selenium.WebElement getForm()
- Returns:
- the form element
-
getFormLocator
public org.openqa.selenium.By getFormLocator()
-
getValue
public String getValue(String fieldName)
Retrieves the value of the specified form field- Parameters:
fieldName
- the name of a form field- Returns:
- the value of the specified form field
- Since:
- 7.0RC1
-
-