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: 28979aebf3df754b81afbc4a925693ef181fb1b1 $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.xwiki.test.ui.po.editor.EditPage
EditPage.Editor
-
-
Field Summary
Fields Modifier and Type Field Description protected org.openqa.selenium.WebElementcontentText-
Fields inherited from class org.xwiki.test.ui.po.editor.EditPage
autoSaveCheckbox, 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 voidclearContent()LoginPageclickModalLoginLink()voidclickToolbarButton(String buttonTitle)voidcloseLoginModal()StringgetContent()Get thecontentof the page.StringgetExactContent()Get thecontentof the page without removing leading or trailing whitespaces.StringgetParent()StringgetTitle()Get thetitleof the page.static WikiEditPagegotoPage(String space, String page)Go to the passed page in wiki edit mode.static WikiEditPagegotoPage(org.xwiki.model.reference.EntityReference pageReference)Open the specified page in Wiki edit mode.booleanisEditCommentDisplayed()booleanisEnabled()booleanloginModalDisplayed()voidsendKeys(CharSequence... keys)voidsendKeysWithAction(org.openqa.selenium.Keys modifierKey, CharSequence... keys)Allows to send a key combination with Selenium 3.voidsetContent(String content)Set thecontentof the page.voidsetEditComment(String comment)Setcommentfor this change.voidsetMinorEdit(boolean value)Set the minor edit check box value.voidsetParent(String parent)Set theparentof the pagevoidsetTitle(String title)Set thetitleof the page.-
Methods inherited from class org.xwiki.test.ui.po.editor.PreviewableEditPage
clickPreview, getPreviewButton, hasPreviewButton
-
Methods inherited from class org.xwiki.test.ui.po.editor.EditPage
clickCancel, clickCancelCSRFWarningButton, clickForceSaveCSRFButton, clickSaveAndContinue, clickSaveAndContinue, clickSaveAndView, clickSaveAndView, clickTranslate, getAutoSaveCheckbox, 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 thetitleof the page.
-
setTitle
public void setTitle(String title)
Set thetitleof the page.
-
getParent
public String getParent()
-
setParent
public void setParent(String parent)
Set theparentof the page- Parameters:
parent- the value for the new parent to set
-
getContent
public String getContent()
Get thecontentof the page.
-
getExactContent
public String getExactContent()
Get thecontentof the page without removing leading or trailing whitespaces.
-
setContent
public void setContent(String content)
Set thecontentof the page.
-
setMinorEdit
public void setMinorEdit(boolean value)
Set the minor edit check box value.
-
setEditComment
public void setEditComment(String comment)
Setcommentfor 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()
-
-