com.atlassian.confluence.selenium.client
Class PageOrderingTree

java.lang.Object
  extended by com.atlassian.confluence.selenium.client.PageOrderingTree
Direct Known Subclasses:
PageOrderingRootTree

public class PageOrderingTree
extends java.lang.Object


Nested Class Summary
static class PageOrderingTree.TreePosition
           
 
Field Summary
protected  ConfluenceSeleniumClient client
           
 
Constructor Summary
PageOrderingTree(ConfluenceSeleniumClient client)
           
 
Method Summary
 void clickPage(Page newParent)
           
 void expandTree(Page page)
          Expands the tree of the given page by clicking on the plus icon.
 java.lang.String getClickPageLocator(Page page)
          Returns a locator for clicking on the link for a specified page in the tree
 java.lang.String getFirstChildNode(Page page)
          Returns the first child node id of the given page.
 java.lang.String getSelectedName()
           
 java.lang.String getSortAlphabeticallyLocator(Page page)
          Returns the sort alphabetical link locator for the given page.
 java.lang.String getTreeNodeLocator(long pageId)
           
 java.lang.String getTreeNodeLocator(Page page)
          Returns the tree node locator for the page
 java.lang.String getUndoLocator(Page page)
          Returns the undo sort link locator for the given page
 boolean isClickable(Page page)
           
 boolean isPagePresent(Page page)
          Returns true if the specified page is present in the tree (it may not be visible).
 boolean isPageVisible(Page page)
          Returns true if the specified page is present and visible in the tree (i.e.
 boolean isPathOpen(java.util.List<Page> path)
           
 boolean isShowingPageWithName(java.lang.String name)
           
 void movePageAsChild(Page page, Page newParent)
           
 void sortAlphabetically(Page page)
          Clicks the sort alphabetical link of the given page
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

protected final ConfluenceSeleniumClient client
Constructor Detail

PageOrderingTree

public PageOrderingTree(ConfluenceSeleniumClient client)
Method Detail

getFirstChildNode

public java.lang.String getFirstChildNode(Page page)
Returns the first child node id of the given page.


expandTree

public void expandTree(Page page)
Expands the tree of the given page by clicking on the plus icon.

Parameters:
page - the page to expand

sortAlphabetically

public void sortAlphabetically(Page page)
Clicks the sort alphabetical link of the given page

Parameters:
page - the page to sort its children alphabetically

getSelectedName

public java.lang.String getSelectedName()
Returns:
the name of the first selected page in the tree or null if there is no selected page

clickPage

public void clickPage(Page newParent)

isPagePresent

public boolean isPagePresent(Page page)
Returns true if the specified page is present in the tree (it may not be visible).


isPageVisible

public boolean isPageVisible(Page page)
Returns true if the specified page is present and visible in the tree (i.e. it hasn't scrolled off the page).


isShowingPageWithName

public boolean isShowingPageWithName(java.lang.String name)
Parameters:
name - the name of page to check for
Returns:
true of the tree is showing a page with the specified name

isClickable

public boolean isClickable(Page page)
Parameters:
page - the page to test
Returns:
true if the supplied page can be clicked in the tree.

getSortAlphabeticallyLocator

public java.lang.String getSortAlphabeticallyLocator(Page page)
Returns the sort alphabetical link locator for the given page.


getUndoLocator

public java.lang.String getUndoLocator(Page page)
Returns the undo sort link locator for the given page


isPathOpen

public boolean isPathOpen(java.util.List<Page> path)
Parameters:
path -
Returns:
true if the supplied path is open on the tree.

getTreeNodeLocator

public java.lang.String getTreeNodeLocator(Page page)
Returns the tree node locator for the page


getTreeNodeLocator

public java.lang.String getTreeNodeLocator(long pageId)

getClickPageLocator

public java.lang.String getClickPageLocator(Page page)
Returns a locator for clicking on the link for a specified page in the tree


movePageAsChild

public void movePageAsChild(Page page,
                            Page newParent)


Copyright © 2003-2014 Atlassian. All Rights Reserved.