com.ibm.team.fvt.tests.clm.pages.elements
Class RmArtifactSidebarSection

java.lang.Object
  extended by com.ibm.team.fvt.tests.web.WebPageElement
      extended by com.ibm.team.fvt.tests.web.WebElementWrapper
          extended by com.ibm.team.fvt.tests.clm.pages.elements.RmArtifactSidebarSection

public class RmArtifactSidebarSection
extends com.ibm.team.fvt.tests.web.WebElementWrapper

Class to manage a sidebar section in an RM artifact web page.

Following features are accessible in this page:

Following internal features are also defined or specialized by this page:


Constructor Summary
RmArtifactSidebarSection(RmWebListPage page, com.ibm.team.fvt.tests.web.WebBrowserElement element)
           
 
Method Summary
 void collapse()
          Collapse the current sidebar section.
 boolean equals(java.lang.Object o)
           
 void expand()
          Expand the current sidebar section.
 com.ibm.team.fvt.tests.web.WebExpandableElement getHeader()
          Return the section header.
 int getItemsCount()
          Get the number of items displayed in the sidebar section.
 com.ibm.team.fvt.tests.web.WebBrowserElement getLinkTypeItemElement(java.lang.String itemText, java.lang.String linkType)
          Get the item for the given text in the given link type of the current sidebar section.
 java.lang.String getSectionName()
          Return the sidebar section name.
 java.lang.String getTitle()
          Return the section title (ie.
 int hashCode()
           
 boolean setLinkTypeFilter(java.lang.String linkType)
          Set the filter for the given link type.
 
Methods inherited from class com.ibm.team.fvt.tests.web.WebElementWrapper
getText
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RmArtifactSidebarSection

public RmArtifactSidebarSection(RmWebListPage page,
                                com.ibm.team.fvt.tests.web.WebBrowserElement element)
Method Detail

collapse

public void collapse()
Collapse the current sidebar section.

If the section is already expanded, then nothing happens.


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

expand

public void expand()
Expand the current sidebar section.

If the section is already expanded, then nothing happens.


getHeader

public com.ibm.team.fvt.tests.web.WebExpandableElement getHeader()
Return the section header.

Returns:
The header web element as WebExpandableElement.

getItemsCount

public int getItemsCount()
Get the number of items displayed in the sidebar section.

This number is deduced from the section title by extracting the number in parenthesis, e.g. if the sidebar header is displaying "Links (3)" then, the section displays 3 items.

Returns:
The number of items as an int.

getLinkTypeItemElement

public com.ibm.team.fvt.tests.web.WebBrowserElement getLinkTypeItemElement(java.lang.String itemText,
                                                                           java.lang.String linkType)
Get the item for the given text in the given link type of the current sidebar section.

Parameters:
itemText - The text of the item to search for
linkType - The type of link for the searched item. If null then the search will occur in all section items.
Returns:
The found item element as a WebBrowserElement or null if not found.

getSectionName

public java.lang.String getSectionName()
Return the sidebar section name.

Returns:
The name as a String.

getTitle

public java.lang.String getTitle()
Return the section title (ie. name + count of displayed element).

Returns:
The title as a String.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setLinkTypeFilter

public boolean setLinkTypeFilter(java.lang.String linkType)
Set the filter for the given link type.

Parameters:
linkType - The link type to filter on