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, MyProfilePage, MyTasksPage, Navigation, PeopleFinderPage, RepositoryPage, Search, SiteFinderPage, SiteNavigation, SitePage, UpdateFilePage, UploadFilePage

public abstract class SharePage
extends Page

Abstract of an Alfresco Share HTML page.

Author:
Michael Suzuki

Field Summary
 
Fields inherited from class org.alfresco.webdrone.Page
DEFAULT_PAGE_LOADING_TIME_WAIT, drone, version
 
Constructor Summary
protected SharePage(IWebDrone drone)
           
 
Method Summary
 RenderTime basicRender(RenderTime timer)
           
 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.
 LoginPage getLogin()
          Gets the LoginPage
 Navigation getNav()
          Get the Navigation
 String getPageTitle()
          Alfresco share based layout and style page title label element.
 Search getSearch()
          Perform inputing a search term in to the search box on the main navigation.
 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, getScreenShot, getTitle, isBrowserTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.webdrone.HtmlPage
render, render, render
 

Constructor Detail

SharePage

protected SharePage(IWebDrone drone)
Method Detail

basicRender

public RenderTime basicRender(RenderTime timer)
                       throws PageException
Parameters:
timer -
Returns:
Throws:
PageException

isLogoPresent

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

Returns:
true if logo element exists

getPageTitle

public String getPageTitle()
                    throws org.openqa.selenium.NoSuchElementException
Alfresco share based layout and style page title label element.

Returns:
String page title label
Throws:
org.openqa.selenium.NoSuchElementException - if title not found

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 Search getSearch()
                 throws Exception
Perform inputing a search term in to the search box on the main navigation.

Returns:
Search page object
Throws:
Exception - if error

findButton

public org.openqa.selenium.WebElement findButton(String button,
                                                 List<org.openqa.selenium.WebElement> elements)
                                          throws org.openqa.selenium.NoSuchElementException
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
Throws:
org.openqa.selenium.NoSuchElementException - if not found

disbaleFileUploadFlash

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



Copyright © 2012. All Rights Reserved.