public class EditPage extends BasePage
Modifier and Type | Class and Description |
---|---|
static class |
EditPage.Editor
Enumerates the available editors.
|
Modifier and Type | Field and Description |
---|---|
protected org.openqa.selenium.WebElement |
cancel |
protected org.openqa.selenium.WebElement |
currentEditorDiv |
protected org.openqa.selenium.WebElement |
save |
protected org.openqa.selenium.WebElement |
saveandcontinue |
protected org.openqa.selenium.WebElement |
syntaxIdSelect |
Constructor and Description |
---|
EditPage() |
Modifier and Type | Method and Description |
---|---|
ViewPage |
clickCancel() |
void |
clickCancelCSRFWarningButton() |
void |
clickForceSaveCSRFButton() |
void |
clickSaveAndContinue() |
void |
clickSaveAndContinue(boolean wait)
Clicks on the Save and Continue button.
|
<T extends ViewPage> |
clickSaveAndView() |
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.
|
WikiEditPage |
clickTranslate(String locale) |
String |
getDefaultLanguage() |
String |
getDocumentTitle() |
EditPage.Editor |
getEditor() |
Set<Locale> |
getExistingLocales() |
protected Set<Locale> |
getExistingLocales(List<org.openqa.selenium.WebElement> elements) |
Set<Locale> |
getNotExistingLocales() |
String |
getParent() |
org.openqa.selenium.WebElement |
getSaveAndContinueButton()
Use this method instead of
clickSaveAndContinue() and call WebElement.click() when you know that
the next page is not a standard XWiki InlinePage . |
org.openqa.selenium.WebElement |
getSaveAndViewButton()
Use this method instead of
clickSaveAndView() and call WebElement.click() when you know that the
next page is not a standard XWiki InlinePage . |
String |
getSyntaxId() |
boolean |
isCSRFWarningDisplayed() |
void |
setDefaultLanguage(String defaultLanguage)
Set the default language input field.
|
void |
setSyntaxId(String syntaxId) |
ViewPage |
useShortcutKeyForCancellingEdition()
Cancel the edition by using keyboard shortcut.
|
void |
waitUntilPageJSIsLoaded()
Waits for the javascript libraries and their plugins that need to load before the UI's elements can be used
safely.
|
canDelete, clickAdminActionsSubMenuEntry, clickEditSubMenuEntry, clickLocale, clickMoreActionsSubMenuEntry, copy, createInlinePage, createPage, delete, edit, editClass, editInline, editObjects, editRights, editWiki, editWYSIWYG, getCurrentUser, getEditURL, getErrorContent, getHTMLMetaDataValue, getLocales, getMetaDataValue, getPageTitle, getPageURL, hasLeftPanel, hasLoginLink, hasNotificationsMenu, 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
protected org.openqa.selenium.WebElement saveandcontinue
protected org.openqa.selenium.WebElement save
protected org.openqa.selenium.WebElement cancel
protected org.openqa.selenium.WebElement currentEditorDiv
protected org.openqa.selenium.WebElement syntaxIdSelect
public void clickSaveAndContinue()
public void clickSaveAndContinue(boolean wait)
clickSaveAndContinue()
when you want to wait
for a different message (e.g. an error message).wait
- true
to wait for the page to be saved, false
otherwisepublic org.openqa.selenium.WebElement getSaveAndContinueButton()
clickSaveAndContinue()
and call WebElement.click()
when you know that
the next page is not a standard XWiki InlinePage
.public <T extends ViewPage> T clickSaveAndView()
public void clickSaveAndView(boolean wait)
wait
- if we should wait for the page to be reloadedpublic org.openqa.selenium.WebElement getSaveAndViewButton()
clickSaveAndView()
and call WebElement.click()
when you know that the
next page is not a standard XWiki InlinePage
.public ViewPage clickCancel()
public EditPage.Editor getEditor()
public String getSyntaxId()
public void setSyntaxId(String syntaxId)
public String getParent()
public String getDocumentTitle()
getDocumentTitle
in class BasePage
public void waitUntilPageJSIsLoaded()
BasePage
Subclassed should override this method and add additional checks needed by their logic.
waitUntilPageJSIsLoaded
in class BasePage
protected Set<Locale> getExistingLocales(List<org.openqa.selenium.WebElement> elements)
public Set<Locale> getExistingLocales()
public Set<Locale> getNotExistingLocales()
public WikiEditPage clickTranslate(String locale)
locale
- the locale to translate topublic void setDefaultLanguage(String defaultLanguage)
defaultLanguage
- the string to fill the input.public String getDefaultLanguage()
public boolean isCSRFWarningDisplayed()
public void clickCancelCSRFWarningButton()
public void clickForceSaveCSRFButton()
Copyright © 2004–2020 XWiki. All rights reserved.