Package org.xwiki.tree.test.po
Class TreeElement
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.tree.test.po.TreeElement
-
public class TreeElement extends BaseElement
Page object used to interact with the generic tree widget available in XWiki.- Since:
- 6.3RC1
- Version:
- $Id: 29486202e180b33e2a1e851f3f89b5319c7169e4 $
-
-
Constructor Summary
Constructors Constructor Description TreeElement(org.openqa.selenium.WebElement element)Creates a new instance that can be used to interact with the tree represented by the given element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeElementclearSelection()Clear the selection in the tree.protected org.openqa.selenium.WebElementgetElement()TreeNodeElementgetNode(String nodeId)List<String>getNodeIDs()List<String>getSelectedNodeIDs()List<TreeNodeElement>getTopLevelNodes()booleanhasNode(String nodeId)TreeElementopenTo(String nodeId)Open the tree to the specified node and select it.voidselectNodes(TreeNodeElement... nodes)Allow to select multiple nodes at once by maintaining ctrl key pressed while clicking on nodes.TreeElementwaitForIt()Wait as long as the tree in busy (loading).TreeElementwaitForNodeSelected(String nodeId)Waits for the specified node to be selected.-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Method Detail
-
getNode
public TreeNodeElement getNode(String nodeId)
- Parameters:
nodeId- the node identifier- Returns:
- the node with the specified identifier
-
hasNode
public boolean hasNode(String nodeId)
- Parameters:
nodeId- the node identifier- Returns:
trueif the specified node is present (loaded),falseotherwise
-
openTo
public TreeElement openTo(String nodeId)
Open the tree to the specified node and select it.- Parameters:
nodeId- the node to open to- Returns:
- this tree
-
clearSelection
public TreeElement clearSelection()
Clear the selection in the tree.- Returns:
- this tree
- Since:
- 7.2M3
-
waitForIt
public TreeElement waitForIt()
Wait as long as the tree in busy (loading).- Returns:
- this tree
-
waitForNodeSelected
public TreeElement waitForNodeSelected(String nodeId)
Waits for the specified node to be selected.- Parameters:
nodeId- the id of the node to wait for- Returns:
- this tree
- Since:
- 7.2
-
getElement
protected org.openqa.selenium.WebElement getElement()
-
selectNodes
public void selectNodes(TreeNodeElement... nodes)
Allow to select multiple nodes at once by maintaining ctrl key pressed while clicking on nodes.- Parameters:
nodes- the nodes to select.- Since:
- 13.3RC1
-
getTopLevelNodes
public List<TreeNodeElement> getTopLevelNodes()
- Returns:
- the list of top level nodes
-
-