org.alfresco.webdrone.share
Class SharePage

java.lang.Object
  extended by org.alfresco.webdrone.Page
      extended by org.alfresco.webdrone.share.SharePage
All Implemented Interfaces:
HtmlPage
Direct Known Subclasses:
AdvanceSearchPage, ChangePasswordPage, CreateSitePage, DashBoardPage, DocumentLibraryNavigation, LoginPage, MyActivitiesDashlet, MyDocumentsDashlet, MyProfilePage, MySitesDashlet, MyTasksDashlet, MyTasksPage, Navigation, NewFolderPage, PeopleFinderPage, SearchBox, SearchResultsPage, SiteContentDashlet, SiteFinderPage, SiteMembersDashlet, SiteNavigation, SitePage, UpdateFilePage, UploadFilePage

public abstract class SharePage
extends Page

Abstract of an Alfresco Share HTML page.

Author:
Michael Suzuki

Field Summary
protected  boolean dojoSupport
           
protected static int WAIT_TIME_3000
           
 
Fields inherited from class org.alfresco.webdrone.Page
drone, maxPageLoadingTime, version
 
Constructor Summary
protected SharePage(WebDrone drone)
           
 
Method Summary
 void basicRender(RenderTime timer)
          Basic render that checks if the page has rendered.
protected  boolean canResume()
          Default wait for site pop up message to disappear, this is currently set to 3 seconds.
protected  boolean canResume(long waitTime)
          Waits for site pop up message to disappear to allow the drone to resume operations on the page.
 void disbaleFileUploadFlash()
          Helper method to disable flash on file upload component, as flash is not supported by WebDriver.
 org.openqa.selenium.WebElement findButton(String button, List<org.openqa.selenium.WebElement> elements)
          Helper to resolve the delete button from the collection of buttons.
 String getCopyRight()
          Get copy right text from alfresco footer.
 LoginPage getLogin()
          Gets the LoginPage
 Navigation getNav()
          Get the Navigation
 String getPageTitle()
          Alfresco share based layout and style page title label element.
 SearchBox getSearch()
          Perform inputing a search term in to the search box on the main navigation.
protected  boolean isJSMessageDisplayed()
          Check if javascript message is displayed.
 boolean isLoggedIn()
          Verifies if a user is currently logged in
 boolean isLogoPresent()
          Verify if the Alfresco logo is present on the page.
 boolean isTitlePresent(String title)
          Verify share page title is present and matches the page
 boolean panelExists(String panelName)
          Verifies if the element is visible on the page.
 
Methods inherited from class org.alfresco.webdrone.Page
close, getDrone, getScreenShot, getTitle, isBrowserTitle, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.alfresco.webdrone.HtmlPage
render, render, render
 

Field Detail

WAIT_TIME_3000

protected static final int WAIT_TIME_3000
See Also:
Constant Field Values

dojoSupport

protected final boolean dojoSupport
Constructor Detail

SharePage

protected SharePage(WebDrone drone)
Method Detail

isJSMessageDisplayed

protected boolean isJSMessageDisplayed()
Check if javascript message is displayed. The message details the background action taking place. Some possible messages are document being uploaded, site being created.

Returns:
if message displayed

basicRender

public void basicRender(RenderTime timer)
Basic render that checks if the page has rendered.

Parameters:
timer - RenderTime

isLogoPresent

public boolean isLogoPresent()
Verify if the Alfresco logo is present on the page.

Returns:
true if logo element exists

getPageTitle

public String getPageTitle()
Alfresco share based layout and style page title label element.

Returns:
String page title label

isTitlePresent

public boolean isTitlePresent(String title)
Verify share page title is present and matches the page

Returns:
true if exists

panelExists

public boolean panelExists(String panelName)
Verifies if the element is visible on the page.

Parameters:
panelName - the css location of the element
Returns:
true if element is visible

getLogin

public LoginPage getLogin()
Gets the LoginPage

Returns:
LoginPage page object

getNav

public Navigation getNav()
Get the Navigation

Returns:
Navigation page object

getSearch

public SearchBox getSearch()
                    throws PageException
Perform inputing a search term in to the search box on the main navigation.

Returns:
Search page object
Throws:
Exception - if error
PageException

findButton

public org.openqa.selenium.WebElement findButton(String button,
                                                 List<org.openqa.selenium.WebElement> elements)
Helper to resolve the delete button from the collection of buttons.

Parameters:
button - String button name value to find
elements - List collection of buttons
Returns:
WebElement delete button

disbaleFileUploadFlash

public void disbaleFileUploadFlash()
Helper method to disable flash on file upload component, as flash is not supported by WebDriver.


isLoggedIn

public boolean isLoggedIn()
Verifies if a user is currently logged in

Returns:
true if user is logged in

getCopyRight

public String getCopyRight()
Get copy right text from alfresco footer.

Returns:
String copy right text.

canResume

protected boolean canResume(long waitTime)
Waits for site pop up message to disappear to allow the drone to resume operations on the page.

Parameters:
waitTime - timer in milliseconds
Returns:
true if message has gone

canResume

protected boolean canResume()
Default wait for site pop up message to disappear, this is currently set to 3 seconds. Once the popup disappears drone can resume operations on the page as the focus is off the div.bd and back on the main page.

Returns:
true if message has gone


Copyright © 2013. All Rights Reserved.