org.alfresco.webdrone.share.site.document
Class DocumentLibraryPage

java.lang.Object
  extended by org.alfresco.webdrone.Page
      extended by org.alfresco.webdrone.share.SharePage
          extended by org.alfresco.webdrone.share.site.SitePage
              extended by org.alfresco.webdrone.share.site.document.DocumentLibraryPage
All Implemented Interfaces:
HtmlPage, Render
Direct Known Subclasses:
RepositoryPage

public class DocumentLibraryPage
extends SitePage

Site document library page object, holds all element of the HTML page relating to share's site document library page.

Since:
1.0
Author:
Michael Suzuki

Field Summary
static String FILES_AND_DOCUMENTS_TABLE_CSS
           
 
Fields inherited from class org.alfresco.webdrone.share.SharePage
dojoSupport, WAIT_TIME_3000
 
Fields inherited from class org.alfresco.webdrone.Page
drone, maxPageLoadingTime, version
 
Constructor Summary
DocumentLibraryPage(WebDrone drone)
           
DocumentLibraryPage(WebDrone drone, boolean shouldHaveFiles)
           
DocumentLibraryPage(WebDrone drone, String subfolderName)
          Constructor.
DocumentLibraryPage(WebDrone drone, String contentName, String hasTag)
           
 
Method Summary
 SharePage deleteItem(String name)
          Locates the file or folder and deletes it.
 FileDirectoryInfo findFileOrFolder(String name)
          Selects file or folder from page.
 Integer getCommentCount()
          The number of comments value displayed on the span comment count.
 List<FileDirectoryInfo> getFiles()
          Extracts the results from result table that matches the file name.
 DocumentLibraryNavigation getNavigation()
          Get document library sub navigation.
 ShareContentRow getShareContentRow(String name)
          Returns the ShareContentRow for the selected contentName.
 boolean hasFiles()
          Check to see if files exists based on a span that displays the current page result on the paginator.
 boolean hasNextPage()
          Checks if pagination next button is active.
 boolean hasPreviousPage()
          Checks if pagination previous button is active.
 boolean isDocumentLibrary()
          Verify if the page viewed is the document library page.
 boolean isFilesVisible()
          Checks to see if files is on the page.
 boolean isFileVisible(String fileName)
          Checks to see if file is visible on the page.
 boolean isSubFolderDocLib(String name)
          Checks to verify if we are in the correct sub folder document library page.
 DocumentLibraryPage render()
          Page renderer verifies the page has rendered by checking java script page loaded status is complete.
 DocumentLibraryPage render(long time)
          Page renderer verifies the page has rendered by checking all elements are visible and loaded by the max limit time set.
 DocumentLibraryPage render(RenderTime timer)
          Page renderer verifies the page has rendered by checking all elements are visible and loaded.
protected  SharePage selectEntry(String title)
          Selects an entry regardless of type (file or folder)
 DocumentDetailsPage selectFile(String title)
          Selects the title of the document link.
 DocumentLibraryPage selectFolder(String title)
          Selects the title of the folder link.
 void selectNextPage()
          Selects the button next on the pagination bar.
 void selectPreviousPage()
          Selects the button previous on the pagination bar.
 
Methods inherited from class org.alfresco.webdrone.share.site.SitePage
getSiteNav, isSite, isSitePage
 
Methods inherited from class org.alfresco.webdrone.share.SharePage
basicRender, canResume, canResume, disbaleFileUploadFlash, elementRender, findButton, getCopyRight, getLogin, getNav, getPageTitle, getSearch, isJSMessageDisplayed, isLoggedIn, isLogoPresent, isTitlePresent, panelExists
 
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
 

Field Detail

FILES_AND_DOCUMENTS_TABLE_CSS

public static final String FILES_AND_DOCUMENTS_TABLE_CSS
See Also:
Constant Field Values
Constructor Detail

DocumentLibraryPage

public DocumentLibraryPage(WebDrone drone,
                           String subfolderName)
Constructor.


DocumentLibraryPage

public DocumentLibraryPage(WebDrone drone)

DocumentLibraryPage

public DocumentLibraryPage(WebDrone drone,
                           boolean shouldHaveFiles)

DocumentLibraryPage

public DocumentLibraryPage(WebDrone drone,
                           String contentName,
                           String hasTag)
Method Detail

render

public DocumentLibraryPage render(RenderTime timer)
Description copied from interface: Render
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

isSubFolderDocLib

public boolean isSubFolderDocLib(String name)
Checks to verify if we are in the correct sub folder document library page.

Returns:
true if bread crumb match location of the sub folder name.

render

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

Returns:
HtmlPage object response

render

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

Parameters:
time - waiting time
Returns:
HtmlPage page object response

isDocumentLibrary

public boolean isDocumentLibrary()
Verify if the page viewed is the document library page.


getNavigation

public DocumentLibraryNavigation getNavigation()
Get document library sub navigation.

Returns:
DocumentLibraryNavigation object.

getFiles

public List<FileDirectoryInfo> getFiles()
Extracts the results from result table that matches the file name.

Returns:
Collection of FileDirectoryInfo relating to result

selectFile

public DocumentDetailsPage selectFile(String title)
Selects the title of the document link.

Parameters:
title - String file title
Returns:
DocumentDetailsPage page response object

selectFolder

public DocumentLibraryPage selectFolder(String title)
Selects the title of the folder link.

Parameters:
title - String folder title
Returns:
DocumentLibraryPage page response object

selectEntry

protected SharePage selectEntry(String title)
Selects an entry regardless of type (file or folder)


findFileOrFolder

public FileDirectoryInfo findFileOrFolder(String name)
Selects file or folder from page.

Parameters:
name - identifier
Returns:
true if selected

isFileVisible

public boolean isFileVisible(String fileName)
Checks to see if file is visible on the page.

Parameters:
fileName - String title
Returns:
true if file exists on the page

isFilesVisible

public boolean isFilesVisible()
Checks to see if files is on the page.

Returns:
true if file exists on the page

getCommentCount

public Integer getCommentCount()
The number of comments value displayed on the span comment count.

Returns:
Integer total number of comments

hasNextPage

public boolean hasNextPage()
Checks if pagination next button is active.

Returns:
true if next page exists

hasPreviousPage

public boolean hasPreviousPage()
Checks if pagination previous button is active.

Returns:
true if next page exists

selectNextPage

public void selectNextPage()
Selects the button next on the pagination bar.


selectPreviousPage

public void selectPreviousPage()
Selects the button previous on the pagination bar.


hasFiles

public boolean hasFiles()
Check to see if files exists based on a span that displays the current page result on the paginator. If no results there is no span.

Returns:
true if span is visible

deleteItem

public SharePage deleteItem(String name)
Locates the file or folder and deletes it.

Parameters:
name - String identifier
Returns:
page response

getShareContentRow

public ShareContentRow getShareContentRow(String name)
Returns the ShareContentRow for the selected contentName.

Parameters:
WebDrone - drone
name - String content name identifier
Returns:
ShareContentRow


Copyright © 2013. All Rights Reserved.