public class HierarchicalElement extends Element
Modifier and Type | Field and Description |
---|---|
protected HierarchicalElement[] |
children |
protected HierarchicalElement |
parent |
static java.lang.String |
PROPERTY_CHILDREN
'children'
|
static java.lang.String |
PROPERTY_PARENT
'parent'
|
clickableWebElement, disabled, iconURL, label, PROPERTY_CLASS, PROPERTY_DISABLED, PROPERTY_EXPANDED, PROPERTY_ICON, PROPERTY_ID, PROPERTY_INDEX, PROPERTY_LABEL, PROPERTY_SELECTABLE, PROPERTY_SELECTED, PROPERTY_TEXTCONTENT, PROPERTY_VALUE, PROPERTY_VISIBLE, selected, visible
cssClass, id, map, object, possibleRecognitionStrings, searchContext, tagName, webelement
Modifier | Constructor and Description |
---|---|
protected |
HierarchicalElement() |
|
HierarchicalElement(java.lang.Object object) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(HierarchicalElement child) |
void |
addChild(HierarchicalElement[] childs) |
HierarchicalElement[] |
getChildren() |
org.openqa.selenium.WebElement |
getClickableWebElement()
In this method, we are trying to get a WebElement occupying the precise area of the node.
The node's text is often represented by a tag <span>, which is what we want, we will try to get it by the node's text. |
java.lang.String |
getFullPath()
Return the full path of this node in the hierarchical structure.
|
HierarchicalElement |
getParent() |
java.lang.String |
getRootId()
Return the root's id (the root of this hierarchical structure like Tree or Menu)
|
protected HierarchicalElement[] |
newArray(int length)
Create an array of HierarchicalElement.
Sub class MUST OVERRIDE this method to provide its own array. |
protected HierarchicalElement |
newInstance(java.lang.Object ojbect)
Create an instance of HierarchicalElement.
Sub class MUST OVERRIDE this method to provide its own instance. |
protected void |
parseChildren(java.util.Map<?,?> map)
parse the children of this element.
|
protected void |
parseChildren(org.openqa.selenium.WebElement element) |
void |
reverseChildren() |
void |
setChildren(HierarchicalElement[] children) |
void |
setParent(HierarchicalElement parent) |
void |
updateFields()
set/update the class's fields through the underlying WebElement or AbstractMap.
|
_getLabel, contentValue, equals, getIconURL, getLabel, isDisabled, isSelected, isVisible, parseWebElementText, setSelected, toString
getAttribute, getCssClass, getEmbeddedObject, getId, getMap, getPossibleRecognitionStrings, getSearchContext, getTagName, getWebElement, initialize, isStale, refresh, setCssClass, setId, setPossibleRecognitionStrings, setSearchContext, setTagName, setWebElement
public static final java.lang.String PROPERTY_CHILDREN
public static final java.lang.String PROPERTY_PARENT
protected HierarchicalElement parent
protected HierarchicalElement[] children
protected HierarchicalElement()
public HierarchicalElement(java.lang.Object object)
public void updateFields()
updateFields
in class Element
DefaultRefreshable.refresh(boolean)
protected void parseChildren(org.openqa.selenium.WebElement element)
protected void parseChildren(java.util.Map<?,?> map)
newArray(int)
/newInstance(Object)
to provide their own instance/array.map
- Map, contains 'children' field.newArray(int)
,
newInstance(Object)
protected HierarchicalElement newInstance(java.lang.Object ojbect)
ojbect
- Object, to create an instance of this class.protected HierarchicalElement[] newArray(int length)
length
- int, the length of the arraypublic HierarchicalElement[] getChildren()
public void setChildren(HierarchicalElement[] children) throws SeleniumPlusException
SeleniumPlusException
public void addChild(HierarchicalElement[] childs)
public void addChild(HierarchicalElement child)
public void reverseChildren()
public HierarchicalElement getParent()
public void setParent(HierarchicalElement parent)
public java.lang.String getRootId()
public java.lang.String getFullPath()
public org.openqa.selenium.WebElement getClickableWebElement()
getClickableWebElement
in class Element
getClickableWebElement()
Copyright © SAS Institute. All Rights Reserved.