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 TreeNodeElement
close()
Closes this tree node.TreeNodeElement
deselect()
Deselects this tree node by clicking on its label.List<TreeNodeElement>
getChildren()
String
getId()
String
getLabel()
org.openqa.selenium.WebElement
getLabelElement()
boolean
isLeaf()
boolean
isOpen()
boolean
isSelected()
TreeNodeElement
open()
Opens this tree node.TreeNodeElement
select()
Selects this tree node by clicking on its label.TreeNodeElement
waitForIt()
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:
true
if this node is a leaf (no children),false
otherwise
-
isOpen
public boolean isOpen()
- Returns:
true
if this node is opened (children are visible),false
otherwise
-
isSelected
public boolean isSelected()
- Returns:
true
if this node is selected,false
otherwise
-
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
-
-