org.xwiki.test.ui.po
Class BasePage

java.lang.Object
  extended by org.xwiki.test.ui.po.BaseElement
      extended by org.xwiki.test.ui.po.BasePage
Direct Known Subclasses:
AbstractRegistrationPage, ChangeAvatarPage, ClassEditPage, DocumentDoesNotExistPage, EditPage, ResubmissionPage, ViewPage

public class BasePage
extends BaseElement

Represents the common actions possible on all Pages.

Since:
3.2M3
Version:
$Id: 8c8d933e41674ec0f7aabe322f1a4ec267dd73bc $

Constructor Summary
BasePage()
           
 
Method Summary
protected  void clickContentMenuEditSubMenuEntry(String id)
          Perform a click on a "content menu" sub-menu entry.
protected  void clickContentMenuTopEntry(String id)
          Perform a click on a "content menu" top entry.
protected
<T extends InlinePage>
T
createInlinePage()
          Can be overridden to return extended InlinePage.
 void edit()
          Performs a click on the "edit" entry of the content menu.
 ClassEditPage editClass()
          Performs a click on the "edit class" entry of the content menu.
<T extends InlinePage>
T
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 getEditURL()
          Gets a string representation of the URL for editing the page.
 String getMetaDataValue(String metaName)
           
 String getPageTitle()
           
 String getPageURL()
           
 boolean isAuthenticated()
           
 boolean isNewDocument()
          Determine if the current page is a new document.
 void sendKeys(CharSequence... keys)
           
 BasePage waitUntilPageIsLoaded()
          Waits until the page has loaded.
 
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

BasePage

public BasePage()
Method Detail

getPageTitle

public String getPageTitle()

getPageURL

public String getPageURL()

getMetaDataValue

public String getMetaDataValue(String metaName)

isAuthenticated

public boolean isAuthenticated()
Returns:
true if we are currently logged in, false otherwise

isNewDocument

public boolean isNewDocument()
Determine if the current page is a new document.

Returns:
true if the document is new, false otherwise

clickContentMenuTopEntry

protected void clickContentMenuTopEntry(String id)
Perform a click on a "content menu" top entry.

Parameters:
id - The id of the entry to follow

clickContentMenuEditSubMenuEntry

protected void clickContentMenuEditSubMenuEntry(String id)
Perform a click on a "content menu" sub-menu entry.

Parameters:
id - The id of the entry to follow

edit

public void edit()
Performs a click on the "edit" entry of the content menu.


getEditURL

public String getEditURL()
Gets a string representation of the URL for editing the page.


editWiki

public WikiEditPage editWiki()
Performs a click on the "edit wiki" entry of the content menu.


editWYSIWYG

public WYSIWYGEditPage editWYSIWYG()
Performs a click on the "edit wysiwyg" entry of the content menu.


editInline

public <T extends InlinePage> T editInline()
Performs a click on the "edit inline" entry of the content menu.


createInlinePage

protected <T extends InlinePage> T createInlinePage()
Can be overridden to return extended InlinePage.


editRights

public RightsEditPage editRights()
Performs a click on the "edit acces rights" entry of the content menu.


editObjects

public ObjectEditPage editObjects()
Performs a click on the "edit objects" entry of the content menu.


editClass

public ClassEditPage editClass()
Performs a click on the "edit class" entry of the content menu.


sendKeys

public void sendKeys(CharSequence... keys)
Since:
3.2M3

waitUntilPageIsLoaded

public BasePage waitUntilPageIsLoaded()
Waits until the page has loaded. Normally we don't need to call this method since a click in Selenium2 is a blocking call. However there are cases (such as when using a shortcut) when we asynchronously load a page.

Returns:
this page
Since:
3.2M3


Copyright © 2004-2013 XWiki. All Rights Reserved.