Package org.xwiki.test.ui.po.editor
Class WikiEditPage
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.test.ui.po.BasePage
-
- org.xwiki.test.ui.po.editor.EditPage
-
- org.xwiki.test.ui.po.editor.PreviewableEditPage
-
- org.xwiki.test.ui.po.editor.WikiEditPage
-
public class WikiEditPage extends PreviewableEditPage
Represents the common actions possible on all Pages when using the "edit" action with "wiki" editor- Since:
- 3.2M3
- Version:
- $Id: 3ecf43dfc7f5ec7d9986c7ed5a118469c940e42d $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.xwiki.test.ui.po.editor.EditPage
EditPage.Editor
-
-
Field Summary
-
Fields inherited from class org.xwiki.test.ui.po.editor.EditPage
cancel, currentEditorDiv, save, saveandcontinue, syntaxIdSelect
-
-
Constructor Summary
Constructors Constructor Description WikiEditPage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearContent()
LoginPage
clickModalLoginLink()
void
clickToolbarButton(String buttonTitle)
void
closeLoginModal()
String
getContent()
Get thecontent
of the page.String
getExactContent()
Get thecontent
of the page without removing leading or trailing whitespaces.String
getParent()
String
getTitle()
Get thetitle
of the page.static WikiEditPage
gotoPage(String space, String page)
Go to the passed page in wiki edit mode.static WikiEditPage
gotoPage(org.xwiki.model.reference.EntityReference pageReference)
Open the specified page in Wiki edit mode.boolean
isEditCommentDisplayed()
boolean
isEnabled()
boolean
loginModalDisplayed()
void
sendKeys(CharSequence... keys)
void
sendKeysWithAction(org.openqa.selenium.Keys modifierKey, CharSequence... keys)
Allows to send a key combination with Selenium 3.void
setContent(String content)
Set thecontent
of the page.void
setEditComment(String comment)
Setcomment
for this change.void
setMinorEdit(boolean value)
Set the minor edit check box value.void
setParent(String parent)
Set theparent
of the pagevoid
setTitle(String title)
Set thetitle
of the page.-
Methods inherited from class org.xwiki.test.ui.po.editor.PreviewableEditPage
clickPreview, getPreviewButton
-
Methods inherited from class org.xwiki.test.ui.po.editor.EditPage
clickCancel, clickCancelCSRFWarningButton, clickForceSaveCSRFButton, clickSaveAndContinue, clickSaveAndContinue, clickSaveAndView, clickSaveAndView, clickTranslate, getDefaultLanguage, getDocumentTitle, getEditor, getExistingLocales, getExistingLocales, getNotExistingLocales, getSaveAndContinueButton, getSaveAndViewButton, getSyntaxId, isCSRFWarningDisplayed, setDefaultLanguage, setSyntaxId, useShortcutKeyForCancellingEdition
-
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, getDrawerMenu, getEditURL, getErrorContent, getHTMLMetaDataValue, getLocales, getMetaDataValue, getPageTitle, getPageURL, getXWikiMessageContent, hasLeftPanel, hasLoginLink, hasNotificationsMenu, hasRenderingError, isAuthenticated, isForbidden, isNewDocument, isNotificationsMenuOpen, login, logout, register, reloadPage, rename, toggleActionMenu, toggleNotificationsMenu, useShortcutKeyForClassEditing, useShortcutKeyForEditing, useShortcutKeyForInlineEditing, useShortcutKeyForObjectEditing, useShortcutKeyForPageDeletion, useShortcutKeyForPageRenaming, useShortcutKeyForRightsEditing, useShortcutKeyForSourceViewer, useShortcutKeyForWikiEditing, useShortcutKeyForWysiwygEditing, validateWCAG, validateWCAG, validateWCAG, 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
-
gotoPage
public static WikiEditPage gotoPage(String space, String page)
Go to the passed page in wiki edit mode.
-
gotoPage
public static WikiEditPage gotoPage(org.xwiki.model.reference.EntityReference pageReference)
Open the specified page in Wiki edit mode.- Parameters:
pageReference
- the page to open- Since:
- 12.10.9, 13.4.1, 13.5RC1
-
getTitle
public String getTitle()
Get thetitle
of the page.
-
setTitle
public void setTitle(String title)
Set thetitle
of the page.
-
getParent
public String getParent()
-
setParent
public void setParent(String parent)
Set theparent
of the page- Parameters:
parent
- the value for the new parent to set
-
getContent
public String getContent()
Get thecontent
of the page.
-
getExactContent
public String getExactContent()
Get thecontent
of the page without removing leading or trailing whitespaces.
-
setContent
public void setContent(String content)
Set thecontent
of the page.
-
setMinorEdit
public void setMinorEdit(boolean value)
Set the minor edit check box value.
-
setEditComment
public void setEditComment(String comment)
Setcomment
for this change.
-
isEditCommentDisplayed
public boolean isEditCommentDisplayed()
- Returns:
- true if the edit comment input field is displayed
-
loginModalDisplayed
public boolean loginModalDisplayed()
-
closeLoginModal
public void closeLoginModal()
-
clickModalLoginLink
public LoginPage clickModalLoginLink()
-
clickToolbarButton
public void clickToolbarButton(String buttonTitle)
-
clearContent
public void clearContent()
-
sendKeys
public void sendKeys(CharSequence... keys)
-
sendKeysWithAction
public void sendKeysWithAction(org.openqa.selenium.Keys modifierKey, CharSequence... keys)
Allows to send a key combination with Selenium 3. We created this method to avoid some issues while usingKeys.chord(CharSequence...)
in Selenium 3. In order to trigger the actions on the specific cursor place, you need to first place your cursor inside the content area by usingsendKeys(CharSequence...)
with arrows.- Parameters:
modifierKey
- the meta key to be called for the shortcut (SHIFT/ALT/META)keys
- the key sequence to call during the shortcut.
-
isEnabled
public boolean isEnabled()
-
-