|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.team.fvt.tests.web.WebPageElement
com.ibm.team.fvt.tests.web.WebElementWrapper
com.ibm.team.fvt.tests.web.WebFolderElement
public class WebFolderElement
Class to handle a folder web element in a web page. A folder may contain multiple folders, which may be several levels deep.
Following features are available on a folder:
collapse()
: Collapse the folder.expand()
: Expand the folder.getAllLeaves()
: Get all the leaves under the current folder.getChild(String)
: Returns the given child folder.getChildren()
: Returns the folder's children.selectFolder(String)
: Selects the given folder. The full folder path must be
specified to access the sub-folders.Following internal features are available for a folder:
collapse()
: Collapse the folder.expand()
: Expand the folder.getChild(String)
: Returns the given child folder.getChildren()
: Returns the folder's children.selectFolder(String)
: Selects the given folder. The full folder path must be
specified to access the sub-folders.
Constructor Summary | |
---|---|
WebFolderElement(WebPage page,
WebBrowserElement element,
org.openqa.selenium.By expandBy,
org.openqa.selenium.By expansionBy,
org.openqa.selenium.By containerBy)
|
|
WebFolderElement(WebPage page,
WebBrowserElement element,
org.openqa.selenium.By expandBy,
org.openqa.selenium.By expansionBy,
org.openqa.selenium.By containerBy,
WebFolderElement parentFolder)
|
|
WebFolderElement(WebPage page,
WebBrowserElement element,
WebFolderElement parentFolder)
|
Method Summary | |
---|---|
void |
collapse()
Collapse the folder. |
void |
expand()
Expand the folder. |
java.util.List<WebFolderElement> |
getAllLeaves()
Return all leaves of the current folder. |
java.util.List<java.lang.String> |
getAllPaths()
Return path for all leaves of the current folder. |
java.util.List<WebFolderElement> |
getChildren()
Returns the folder's children. |
WebFolderElement |
getFolder(java.lang.String folderPath)
Gets the sub-folder for the given path. |
java.lang.String |
getPath()
Returns the path of the current folder. |
java.lang.String |
getText()
Return the text of the expandable element. |
WebFolderElement |
searchFolder(java.lang.String folder)
Searches the folder with the given name in the hierarchy starting from current folder. |
void |
select()
Select the folder. |
WebFolderElement |
selectFolder(java.lang.String folderPath)
Selects the sub-folder for the given path. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebFolderElement(WebPage page, WebBrowserElement element, org.openqa.selenium.By expandBy, org.openqa.selenium.By expansionBy, org.openqa.selenium.By containerBy)
public WebFolderElement(WebPage page, WebBrowserElement element, org.openqa.selenium.By expandBy, org.openqa.selenium.By expansionBy, org.openqa.selenium.By containerBy, WebFolderElement parentFolder)
public WebFolderElement(WebPage page, WebBrowserElement element, WebFolderElement parentFolder)
Method Detail |
---|
public void collapse()
public void expand()
public java.util.List<WebFolderElement> getAllLeaves()
List
of WebFolderElement
.public java.util.List<java.lang.String> getAllPaths()
List
of String
.public final java.util.List<WebFolderElement> getChildren()
List
of WebFolderElement
.public WebFolderElement getFolder(java.lang.String folderPath)
For example, "JKE Banking/JKE Enterprise Project/Business Goals" accesses the Business Goals sub-sub-folder. To access the top folder or project folder just enter the folder name, ex. "JKE Banking".
folderPath
- The folder path. Might be a simple name or a fully-qualified
path using '/' character for segment delimiter.
WebFolderElement
or
null
if no folder was not found for the given folder path.public java.lang.String getPath()
The path is made of all containing folders texts separated by /'s plus the folder text (e.g. "/Custom Reports/Sample Report Definitions/CCM").
TODO: It seems to be a really costly operation, needs to be improved...
public java.lang.String getText()
Overrides to return the text of the expandable element.
getText
in class WebElementWrapper
String
.public WebFolderElement searchFolder(java.lang.String folder)
There's no indication if the returned folder is the unique one with the given name in the hierarchy, as the first matching folder (deepest first) is returned.
folder
- The folder to search in the hierarchy. That might be either a name
or a path (absolute or relative).
WebFolderElement
or null
if none was found.public void select()
public WebFolderElement selectFolder(java.lang.String folderPath) throws ScenarioFailedError
For example, "JKE Banking/JKE Enterprise Project/Business Goals" accesses the Business Goals sub-folder. To access the top folder or project folder just enter the folder name, ex. "JKE Banking".
folderPath
- The folder path. Might be a simple name or a fully-qualified
path using '/' character for segment delimiter.
WebFolderElement
.
ScenarioFailedError
- if no folder was not found for the given folder path.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |