org.alfresco.webdrone.share.site
Class CreateSitePage

java.lang.Object
  extended by org.alfresco.webdrone.Page
      extended by org.alfresco.webdrone.share.SharePage
          extended by org.alfresco.webdrone.share.site.CreateSitePage
All Implemented Interfaces:
HtmlPage

public class CreateSitePage
extends SharePage

Create site page object, holds all element of the html page relating to share's create site page.

Since:
1.0
Author:
Michael Suzuki

Field Summary
 
Fields inherited from class org.alfresco.webdrone.Page
DEFAULT_PAGE_LOADING_TIME_WAIT, drone, version
 
Constructor Summary
CreateSitePage(WebDrone drone)
          Constructor.
 
Method Summary
 HtmlPage createNewSite(String siteName)
          Create a new site action.
 boolean isCreateSiteDialogDisplayed()
          Verify if the create dialog is displayed.
 CreateSitePage render()
          Page renderer verifies the page has rendered by checking java script page loaded status is complete.
 CreateSitePage render(long time)
          Page renderer verifies the page has rendered by checking all elements are visible and loaded by the max limit time set.
 CreateSitePage render(RenderTime timer)
          Page renderer verifies the page has rendered by checking all elements are visible and loaded.
 void waitUntilSiteCreation(String siteName)
          Verify that site has been created before rendering the page response object of site dashboard page.
 
Methods inherited from class org.alfresco.webdrone.share.SharePage
basicRender, disbaleFileUploadFlash, findButton, getLogin, getNav, getPageTitle, getSearch, isLogoPresent, isTitlePresent, panelExists
 
Methods inherited from class org.alfresco.webdrone.Page
close, getScreenShot, getTitle, isBrowserTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateSitePage

public CreateSitePage(WebDrone drone)
Constructor.

Method Detail

render

public CreateSitePage render(RenderTime timer)
                      throws PageException
Description copied from interface: HtmlPage
Page renderer verifies the page has rendered by checking all elements are visible and loaded. To verify this assertion every page object that implements the method will contain logic to determine if the page has loaded completely in the given time set by the RenderTime.

Parameters:
timer - RenderTime time to wait
Returns:
HtmlPage page object response
Throws:
PageException

render

public CreateSitePage render()
                      throws PageException
Description copied from interface: HtmlPage
Page renderer verifies the page has rendered by checking java script page loaded status is complete.

Returns:
HtmlPage object response
Throws:
PageException

render

public CreateSitePage render(long time)
                      throws PageException
Description copied from interface: HtmlPage
Page renderer verifies the page has rendered by checking all elements are visible and loaded by the max limit time set.

Returns:
HtmlPage page object response
Throws:
PageException

isCreateSiteDialogDisplayed

public boolean isCreateSiteDialogDisplayed()
Verify if the create dialog is displayed. A wait is introduce to deal with javascript side effects not rendering the page in the same way as html.

Returns:
true if dialog is displayed.

createNewSite

public HtmlPage createNewSite(String siteName)
                       throws PageException
Create a new site action.

Parameters:
siteName - String mandatory field
Returns:
HtmlPage page response
Throws:
Exception - if error
PageException

waitUntilSiteCreation

public void waitUntilSiteCreation(String siteName)
Verify that site has been created before rendering the page response object of site dashboard page. The FluentWait is applied with a By to check that the title in the message matches the site name to ensure the new site has been created.

Parameters:
siteName - String site name to check


Copyright © 2012. All Rights Reserved.