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

java.lang.Object
  extended by org.alfresco.webdrone.share.site.document.FileDirectoryInfo

public class FileDirectoryInfo
extends Object

Entity that models the list of file or directories as it appears on the DocumentLibraryPage. The list models the HTML element representing the file or directory.

Author:
Michael Suzuki

Constructor Summary
FileDirectoryInfo(HtmlElement element)
           
 
Method Summary
 DocumentLibraryPage addTag(WebDrone drone, String contentName, String tagName)
          Adds the specified Tag to the file or directory.
protected  boolean canResume(String element)
          Waits for expected element to be displayed and available for action before drone resumes operations on the page.
protected  boolean canResume(String elementCss, long waitTime)
          Waits for expected element to be displayed and available for action before drone resumes operations on the page.
 void clickOnTitle()
          Click on title.
 List<org.openqa.selenium.WebElement> getContentActions(WebDrone drone)
          Selects the 'Actions' menu link on the select data row on DocumentLibrary Page.
 String getContentEditInfo()
          Gets the Create / Edit Information of the file or directory, if none then empty string is returned.
 String getContentNodeRef()
          Get NodeRef for the content on the selected data row on DocumentLibrary Page.
 List<String> getContentTags()
          Gets the Tag Information of the file or directory, if none then 'No Tags' string is returned.
 String getDescription()
          Gets the description of the file or directory, if none then empty string is returned.
 HtmlElement getElement()
           
 String getLikeCount()
          Gets the like count for the selected data row on DocumentLibrary Page
 String getName()
          Gets the name of the file or directory, if none then empty string is returned.
 Boolean hasTags(WebDrone drone)
          Check if tags are attached to the selected content.
 Boolean isFavourite()
          Checks if the Favourite option is selected on the selected data row on DocumentLibrary Page
 boolean isLiked()
          Checks if the Like option is selected on the selected data row on DocumentLibrary Page
 boolean isTypeFolder()
          Checks if the FileDirectory is of a folder type.
 org.openqa.selenium.WebElement selectContentActions(WebDrone drone)
          Selects the 'Actions' menu link on the select data row on DocumentLibrary Page.
 boolean selectDelete(WebDrone drone)
          Select the delete button on the item.
 EditDocumentPropertiesPopup selectEditProperties(WebDrone drone)
          Selects the edit properties link on the select data row on DocumentLibrary Page.
 DocumentLibraryPage selectFavourite(WebDrone drone)
          Selects or deselects the favourite option on the select data row on DocumentLibrary Page
 DocumentLibraryPage selectLike(WebDrone drone)
          Selects or deselects the Like option on the select data row on DocumentLibrary Page
 DocumentDetailsPage selectThumbnail(WebDrone drone)
          Selects the thumbnail link on the select data row on DocumentLibrary Page.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileDirectoryInfo

public FileDirectoryInfo(HtmlElement element)
Method Detail

getName

public String getName()
Gets the name of the file or directory, if none then empty string is returned.

Returns:
String title

clickOnTitle

public void clickOnTitle()
Click on title.


isTypeFolder

public boolean isTypeFolder()
Checks if the FileDirectory is of a folder type.

Returns:
true if folder

getDescription

public String getDescription()
Gets the description of the file or directory, if none then empty string is returned.

Returns:
String Content description

getContentEditInfo

public String getContentEditInfo()
Gets the Create / Edit Information of the file or directory, if none then empty string is returned.

Returns:
String Content Edit Information

getContentTags

public List<String> getContentTags()
Gets the Tag Information of the file or directory, if none then 'No Tags' string is returned.

Returns:
List List of tags added to the content

selectDelete

public boolean selectDelete(WebDrone drone)
Select the delete button on the item.

Parameters:
{@link - WebDrone} WebDrone
Returns:
boolean true if delete option is available and clicked

selectEditProperties

public EditDocumentPropertiesPopup selectEditProperties(WebDrone drone)
Selects the edit properties link on the select data row on DocumentLibrary Page.

Parameters:
drone - WebDrone
Returns:
EditDocumentPropertiesPopup response

selectContentActions

public org.openqa.selenium.WebElement selectContentActions(WebDrone drone)
Selects the 'Actions' menu link on the select data row on DocumentLibrary Page.

Parameters:
drone - WebDrone
Returns:
WebElement WebElement that allows access to Actions menu for the selected Content

getContentActions

public List<org.openqa.selenium.WebElement> getContentActions(WebDrone drone)
Selects the 'Actions' menu link on the select data row on DocumentLibrary Page.

Parameters:
drone - WebDrone
Returns:
List of WebElement available for the selected Content

selectThumbnail

public DocumentDetailsPage selectThumbnail(WebDrone drone)
Selects the thumbnail link on the select data row on DocumentLibrary Page.

Parameters:
drone - WebDrone
Returns:
DocumentDetailsPage response

selectFavourite

public DocumentLibraryPage selectFavourite(WebDrone drone)
Selects or deselects the favourite option on the select data row on DocumentLibrary Page

Parameters:
drone - WebDrone
Returns:
DocumentLibraryPage response

selectLike

public DocumentLibraryPage selectLike(WebDrone drone)
Selects or deselects the Like option on the select data row on DocumentLibrary Page

Parameters:
drone - WebDrone
Returns:
DocumentLibraryPage response

isLiked

public boolean isLiked()
Checks if the Like option is selected on the selected data row on DocumentLibrary Page

Returns:
{Boolean} true if the content is liked

isFavourite

public Boolean isFavourite()
Checks if the Favourite option is selected on the selected data row on DocumentLibrary Page

Returns:
{Boolean} true if the content is marked as Favourite

getLikeCount

public String getLikeCount()
Gets the like count for the selected data row on DocumentLibrary Page

Returns:
{String} Like Count

hasTags

public Boolean hasTags(WebDrone drone)
Check if tags are attached to the selected content.

Returns:
Boolean true if content has one or more Tags

canResume

protected boolean canResume(String element)
Waits for expected element to be displayed and available for action before drone resumes operations on the page.

Parameters:
element - String unique css identifier for an element
Returns:
true if element is available for operation

canResume

protected boolean canResume(String elementCss,
                            long waitTime)
Waits for expected element to be displayed and available for action before drone resumes operations on the page.

Parameters:
elementCss - String css identifier for the element
waitTime - timer in milliseconds
Returns:
true if element is available for operation

addTag

public DocumentLibraryPage addTag(WebDrone drone,
                                  String contentName,
                                  String tagName)
Adds the specified Tag to the file or directory.

Parameters:
Webdrone - drone
contentName - String name of the content to which the Tag is to be added
tagName - String tag to be added
Returns:
DocumentLibraryPage Instance of DocumentLibraryPage page object

getContentNodeRef

public String getContentNodeRef()
Get NodeRef for the content on the selected data row on DocumentLibrary Page.

Returns:
{String} Node Ref / GUID

toString

public String toString()
Overrides:
toString in class Object

getElement

public HtmlElement getElement()


Copyright © 2013. All Rights Reserved.