Package org.xwiki.tree.test.po
Class TreeNodeElement
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.tree.test.po.TreeNodeElement
-
public class TreeNodeElement extends BaseElement
Page object used to interact with a tree node.- Since:
- 6.3RC1
- Version:
- $Id: 162117c6b768e1136b7d581d1269979c2848b6bc $
-
-
Constructor Summary
Constructors Constructor Description TreeNodeElement(org.openqa.selenium.WebElement treeElement, org.openqa.selenium.By locator)Creates a new instance that can be used to interact with the tree node represented by the specified element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeNodeElementclose()Closes this tree node.TreeNodeElementdeselect()Deselects this tree node by clicking on its label.List<TreeNodeElement>getChildren()StringgetId()StringgetLabel()org.openqa.selenium.WebElementgetLabelElement()booleanisLeaf()booleanisOpen()booleanisSelected()TreeNodeElementopen()Opens this tree node.TreeNodeElementselect()Selects this tree node by clicking on its label.TreeNodeElementwaitForIt()Wait as long as this node is in loading state.-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
Constructor Detail
-
TreeNodeElement
public TreeNodeElement(org.openqa.selenium.WebElement treeElement, org.openqa.selenium.By locator)Creates a new instance that can be used to interact with the tree node represented by the specified element.- Parameters:
treeElement- the tree that contains this nodelocator- the element that represents the tree node
-
-
Method Detail
-
getId
public String getId()
- Returns:
- the node id
-
getLabel
public String getLabel()
- Returns:
- the node label (as plain text)
-
getLabelElement
public org.openqa.selenium.WebElement getLabelElement()
- Returns:
- the label element to allow performing actions on it.
- Since:
- 13.3RC1
-
getChildren
public List<TreeNodeElement> getChildren()
- Returns:
- the list of child nodes
-
isLeaf
public boolean isLeaf()
- Returns:
trueif this node is a leaf (no children),falseotherwise
-
isOpen
public boolean isOpen()
- Returns:
trueif this node is opened (children are visible),falseotherwise
-
isSelected
public boolean isSelected()
- Returns:
trueif this node is selected,falseotherwise
-
open
public TreeNodeElement open()
Opens this tree node.- Returns:
- this tree node
-
close
public TreeNodeElement close()
Closes this tree node.- Returns:
- this tree node
-
select
public TreeNodeElement select()
Selects this tree node by clicking on its label.- Returns:
- this tree node
-
deselect
public TreeNodeElement deselect()
Deselects this tree node by clicking on its label.- Returns:
- this tree node
-
waitForIt
public TreeNodeElement waitForIt()
Wait as long as this node is in loading state.- Returns:
- this tree node
-
-