public class BasePage extends BaseElement
Modifier and Type | Field and Description |
---|---|
protected org.openqa.selenium.WebElement |
logo
Used to scroll the page to the top before accessing the floating menu.
|
Constructor and Description |
---|
BasePage()
Note: when reusing instances of BasePage, the constructor is not doing the work anymore and the
waitUntilPageJSIsLoaded() method needs to be executed manually, when needed.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canDelete() |
void |
clickAdminActionsSubMenuEntry(String id)
Deprecated.
use
clickMoreActionsSubMenuEntry(String) instead which has a better name |
protected void |
clickEditSubMenuEntry(String id)
Perform a click on a "edit menu" sub-menu entry.
|
ViewPage |
clickLocale(Locale locale) |
void |
clickMoreActionsSubMenuEntry(String id) |
CopyPage |
copy() |
protected <T extends InlinePage> |
createInlinePage()
Can be overridden to return extended
InlinePage . |
CreatePagePage |
createPage() |
ConfirmationPage |
delete() |
DeletePageConfirmationPage |
deletePage()
Specific delete action when the delete action is performed on a page.
|
void |
edit()
Performs a click on the "edit" button.
|
ClassEditPage |
editClass()
Performs a click on the "edit class" entry of the content menu.
|
<T extends InlinePage> |
editInline()
Performs a click on the "edit inline" entry of the content menu.
|
ObjectEditPage |
editObjects()
Performs a click on the "edit objects" entry of the content menu.
|
RightsEditPage |
editRights()
Performs a click on the "edit acces rights" entry of the content menu.
|
WikiEditPage |
editWiki()
Performs a click on the "edit wiki" entry of the content menu.
|
WYSIWYGEditPage |
editWYSIWYG()
Performs a click on the "edit wysiwyg" entry of the content menu.
|
String |
getCurrentUser() |
String |
getDocumentTitle() |
String |
getEditURL()
Gets a string representation of the URL for editing the page.
|
String |
getErrorContent() |
String |
getHTMLMetaDataValue(String metaName) |
List<Locale> |
getLocales() |
String |
getMetaDataValue(String metaName) |
String |
getPageTitle() |
String |
getPageURL() |
boolean |
hasLeftPanel(String panelTitle) |
boolean |
hasLoginLink() |
boolean |
hasNotificationsMenu()
Says if the notifications menu is present (it is displayed only if it has some content).
|
boolean |
hasRenderingError() |
boolean |
hideDrawer() |
boolean |
isAuthenticated() |
boolean |
isDrawerVisible() |
boolean |
isForbidden() |
boolean |
isNewDocument()
Determine if the current page is a new document.
|
boolean |
isNotificationsMenuOpen() |
LoginPage |
login() |
void |
logout() |
RegistrationPage |
register() |
RenamePage |
rename() |
void |
sendKeys(CharSequence... keys) |
boolean |
showDrawer() |
void |
toggleActionMenu() |
void |
toggleDrawer() |
void |
toggleNotificationsMenu()
Open/Close the notifications menu.
|
ClassEditPage |
useShortcutKeyForClassEditing()
Use keyboard shortcuts to go to class edit page.
|
EditPage |
useShortcutKeyForEditing()
Use keyboard shortcuts to go to edit page.
|
InlinePage |
useShortcutKeyForInlineEditing()
Use keyboard shortcuts to go to Inline Form edit page.
|
ObjectEditPage |
useShortcutKeyForObjectEditing()
Use keyboard shortcuts to go to object edit page.
|
ConfirmationPage |
useShortcutKeyForPageDeletion()
Use keyboard shortcuts to go to delete page.
|
RenamePage |
useShortcutKeyForPageRenaming()
Use keyboard shortcuts to go to rename page.
|
BasePage |
useShortcutKeyForRightsEditing()
Use keyboard shortcuts to go to rights edit page.
|
ViewPage |
useShortcutKeyForSourceViewer()
Use keyboard shortcuts to go to the source view of a page.
|
WikiEditPage |
useShortcutKeyForWikiEditing()
Use keyboard shortcuts to go to wiki edit page.
|
WYSIWYGEditPage |
useShortcutKeyForWysiwygEditing()
Use keyboard shortcuts to go to WYSIWYG edit page.
|
ChildrenViewer |
viewChildren()
Opens the viewer that lists the children of the current page.
|
BasePage |
waitUntilPageIsLoaded()
Waits until the page has loaded.
|
void |
watchDocument() |
void |
watchSpace() |
void |
watchWiki() |
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageJSIsLoaded
protected org.openqa.selenium.WebElement logo
public BasePage()
Note2: Never call the constructor before navigating to the page you need to test first.
public String getPageTitle()
public String getPageURL()
public String getMetaDataValue(String metaName)
metaName
- the name of the XWiki document metadatagetHTMLMetaDataValue(String)
public String getHTMLMetaDataValue(String metaName)
metaName
- the name of the HTML meta fieldpublic boolean isAuthenticated()
public boolean isNewDocument()
protected void clickEditSubMenuEntry(String id)
id
- The id of the entry to followpublic void edit()
public String getEditURL()
public WikiEditPage editWiki()
public WYSIWYGEditPage editWYSIWYG()
public <T extends InlinePage> T editInline()
protected <T extends InlinePage> T createInlinePage()
InlinePage
.public RightsEditPage editRights()
public ObjectEditPage editObjects()
public ClassEditPage editClass()
public void sendKeys(CharSequence... keys)
public BasePage waitUntilPageIsLoaded()
public void toggleDrawer()
public boolean showDrawer()
public boolean hideDrawer()
public boolean isDrawerVisible()
public void toggleActionMenu()
public void clickMoreActionsSubMenuEntry(String id)
@Deprecated public void clickAdminActionsSubMenuEntry(String id)
clickMoreActionsSubMenuEntry(String)
instead which has a better namepublic CreatePagePage createPage()
public CopyPage copy()
public RenamePage rename()
public ConfirmationPage delete()
public DeletePageConfirmationPage deletePage()
public boolean canDelete()
public void watchDocument()
public boolean hasLoginLink()
public LoginPage login()
public String getCurrentUser()
public void logout()
public RegistrationPage register()
public String getDocumentTitle()
public void watchSpace()
public void watchWiki()
public ChildrenViewer viewChildren()
public boolean hasNotificationsMenu()
public void toggleNotificationsMenu()
public boolean isNotificationsMenuOpen()
public String getErrorContent()
public boolean hasLeftPanel(String panelTitle)
panelTitle
- the panel displayed titlepublic boolean isForbidden()
public EditPage useShortcutKeyForEditing()
EditPage
public WikiEditPage useShortcutKeyForWikiEditing()
WikiEditPage
public WYSIWYGEditPage useShortcutKeyForWysiwygEditing()
WYSIWYGEditPage
public InlinePage useShortcutKeyForInlineEditing()
InlinePage
public BasePage useShortcutKeyForRightsEditing()
BasePage
: it can be actually either a RightsEditPage
or an AdministrationPage
depending if the page is terminal or not.public ObjectEditPage useShortcutKeyForObjectEditing()
ObjectEditPage
public ClassEditPage useShortcutKeyForClassEditing()
ClassEditPage
public ConfirmationPage useShortcutKeyForPageDeletion()
ConfirmationPage
public RenamePage useShortcutKeyForPageRenaming()
RenamePage
public ViewPage useShortcutKeyForSourceViewer()
ViewPage
public boolean hasRenderingError()
xwikirenderingerror
)Copyright © 2004–2021 XWiki. All rights reserved.