org.xwiki.test.ui.po
Class ViewPage

java.lang.Object
  extended by org.xwiki.test.ui.po.BaseElement
      extended by org.xwiki.test.ui.po.BasePage
          extended by org.xwiki.test.ui.po.ViewPage
Direct Known Subclasses:
CommentsTab, ComparePage, ConfirmationModal, ConfirmationPage, CopyConfirmationPage, CopyPage, CreatePagePage, CreateSpacePage, DeletePageOutcomePage, InlinePage, LoginPage

public class ViewPage
extends BasePage

Represents the common actions possible on all Pages when using the "view" action.

Since:
3.2M3
Version:
$Id: 281342463aa3f4b97047ead06f2db0aa0983ee1f $

Constructor Summary
ViewPage()
           
 
Method Summary
 boolean canDelete()
           
 ViewPage clickBreadcrumbLink(String linkText)
          Clicks on the breadcrumb link with the given text.
 void clickWantedLink(String spaceName, String pageName, boolean waitForTemplateDisplay)
          Clicks on a wanted link in the page.
 CopyPage copy()
           
 CreatePagePage createPage()
           
 CreateSpacePage createSpace()
           
 ConfirmationPage delete()
           
 WYSIWYGEditPage editSection(int sectionNumber)
           
 boolean exists()
           
 String getBreadcrumbContent()
           
 String getContent()
           
 String getCurrentUser()
           
 String getDocumentTitle()
           
 boolean hasBreadcrumbContent(String breadcrumbItem, boolean isCurrent)
           
 boolean hasLoginLink()
           
 boolean isInlinePage()
           
 LoginPage login()
           
 void logout()
           
 AttachmentsPane openAttachmentsDocExtraPane()
           
 CommentsTab openCommentsDocExtraPane()
          Opens the comments tab.
 HistoryPane openHistoryDocExtraPane()
           
 RegistrationPage register()
           
 void waitForDocExtraPaneActive(String paneId)
           
 void waitUntilContent(String expectedValue)
          Waits until the page has the passed content by refreshing the page
 void watchDocument()
           
 void watchSpace()
           
 
Methods inherited from class org.xwiki.test.ui.po.BasePage
clickContentMenuEditSubMenuEntry, clickContentMenuTopEntry, createInlinePage, edit, editClass, editInline, editObjects, editRights, editWiki, editWYSIWYG, getEditURL, getMetaDataValue, getPageTitle, getPageURL, isAuthenticated, isNewDocument, sendKeys, waitUntilPageIsLoaded
 
Methods inherited from class org.xwiki.test.ui.po.BaseElement
executeJavascript, getDriver, getUtil, makeAlertDialogSilent, makeConfirmDialogSilent, makeElementVisible, makeElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilElementDisappears, waitUntilElementEndsWithAttributeValue, waitUntilElementHasAttributeValue, waitUntilElementHasTextContent, waitUntilElementIsVisible, waitUntilElementsAreVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewPage

public ViewPage()
Method Detail

hasLoginLink

public boolean hasLoginLink()

login

public LoginPage login()

getCurrentUser

public String getCurrentUser()

logout

public void logout()

register

public RegistrationPage register()

createPage

public CreatePagePage createPage()

createSpace

public CreateSpacePage createSpace()

openCommentsDocExtraPane

public CommentsTab openCommentsDocExtraPane()
Opens the comments tab.

Returns:
element for controlling the comments tab

openHistoryDocExtraPane

public HistoryPane openHistoryDocExtraPane()

openAttachmentsDocExtraPane

public AttachmentsPane openAttachmentsDocExtraPane()

exists

public boolean exists()
Returns:
does this page exist.

getContent

public String getContent()
Returns:
the page's main content as text (no HTML)

editSection

public WYSIWYGEditPage editSection(int sectionNumber)

clickWantedLink

public void clickWantedLink(String spaceName,
                            String pageName,
                            boolean waitForTemplateDisplay)
Clicks on a wanted link in the page.


copy

public CopyPage copy()

delete

public ConfirmationPage delete()

canDelete

public boolean canDelete()

getDocumentTitle

public String getDocumentTitle()

getBreadcrumbContent

public String getBreadcrumbContent()

hasBreadcrumbContent

public boolean hasBreadcrumbContent(String breadcrumbItem,
                                    boolean isCurrent)

clickBreadcrumbLink

public ViewPage clickBreadcrumbLink(String linkText)
Clicks on the breadcrumb link with the given text.

Parameters:
linkText - the link text
Returns:
the target of the breadcrumb link

isInlinePage

public boolean isInlinePage()

waitForDocExtraPaneActive

public void waitForDocExtraPaneActive(String paneId)
Parameters:
paneId - valid values: "history", "comments", etc

watchDocument

public void watchDocument()

watchSpace

public void watchSpace()

waitUntilContent

public void waitUntilContent(String expectedValue)
Waits until the page has the passed content by refreshing the page

Parameters:
expectedValue - the content value to wait for (in regex format)
Since:
4.0M1


Copyright © 2004-2013 XWiki. All Rights Reserved.