public abstract class AbstractTreeSelectable extends AbstractHierarchicalSelectable implements ITreeSelectable
contentObjects, DEFAULT_WAIT_TIME
parent
Constructor and Description |
---|
AbstractTreeSelectable(Component parent) |
Modifier and Type | Method and Description |
---|---|
void |
collapseItem(TextMatchingCriterion criterion,
boolean collpaseChildren,
boolean verify)
Collapse the item according to the path.
|
protected abstract void |
collapseItem(TreeNode node,
boolean collpaseChildren) |
protected TreeNode |
convertTo(Element element)
Cast the Element to TreeNode.
|
void |
expandItem(TextMatchingCriterion criterion,
boolean expandChildren,
boolean verify)
Expand the item according to the path.
|
protected abstract void |
expandItem(TreeNode node,
boolean expandChildren) |
TreeNode[] |
getContent()
Try to get the cached content according to the WebElement.
If no cached content can be found, then get the real-time content by calling AbstractSelectable.getCacheableContent() ,and put the content in the cache and return it. If subclass doesn't need this functionality, then just override this method. If subclass needs this functionality, then override method AbstractSelectable.getCacheableContent() |
TreeNode |
getMatchedElement(TextMatchingCriterion criterion)
According to the "hierarchical path" to get a TreeNode object.
|
protected boolean |
verifyItemExpanded(TreeNode node)
Note:In subclass, we need to update the 'expanded' property of TreeNode.
Verify if a tree node is expanded or collapsed. |
protected void |
verifyItemExpension(TreeNode node,
boolean expectExpended) |
activateItem, getMatchedNode, getMatchedNode, selectItem, verifyItemSelection
activateItem, clearCache, clickElement, getCacheableContent, selectItem, showOnPage, verifyContains, verifyItemSelected, verifyItemSelection, verifyItemSelection, waitAndVerifyItemSelected, waitElementReady, waitElementReady
isShowOnPage, isSupported, refresh, webelement
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activateItem, activateItem, selectItem, selectItem, verifyContains, verifyItemSelection, verifyItemSelection
clearCache
getSupportedClassNames
public AbstractTreeSelectable(Component parent) throws SeleniumPlusException
parent
- SeleniumPlusException
public TreeNode[] getContent() throws SeleniumPlusException
AbstractSelectable
AbstractSelectable.getCacheableContent()
,AbstractSelectable.getCacheableContent()
getContent
in interface IHierarchicalSelectable
getContent
in interface ISelectable
getContent
in interface ITreeSelectable
getContent
in class AbstractSelectable
SeleniumPlusException
AbstractSelectable.getCacheableContent()
public void expandItem(TextMatchingCriterion criterion, boolean expandChildren, boolean verify) throws SeleniumPlusException
ITreeSelectable
expandItem
in interface ITreeSelectable
criterion
- TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.expandChildren
- boolean, if true then expand all the children of this node.verify
- boolean, if true then verify the treepath has been expended.SeleniumPlusException
public void collapseItem(TextMatchingCriterion criterion, boolean collpaseChildren, boolean verify) throws SeleniumPlusException
ITreeSelectable
collapseItem
in interface ITreeSelectable
criterion
- TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.collpaseChildren
- boolean, if true then collapse all the children of this node.verify
- boolean, if true then verify the treepath has been collapse.SeleniumPlusException
protected void verifyItemExpension(TreeNode node, boolean expectExpended) throws SeleniumPlusException
node
- TreeNodeexpectExpended
- boolean, true then the node is expected as expended; false then the node is expected as collapsed.SeleniumPlusException
protected abstract void expandItem(TreeNode node, boolean expandChildren) throws SeleniumPlusException
node
- TreeNode, the node to expand.expandChildren
- boolean, if true then expand all the children of this node.SeleniumPlusException
protected abstract void collapseItem(TreeNode node, boolean collpaseChildren) throws SeleniumPlusException
node
- TreeNode, the node to collapse.collpaseChildren
- boolean, if true then collapse all the children of this node.SeleniumPlusException
protected boolean verifyItemExpanded(TreeNode node) throws SeleniumPlusException
node
- TreeNodeSeleniumPlusException
public TreeNode getMatchedElement(TextMatchingCriterion criterion) throws SeleniumPlusException
getMatchedElement
in interface ISelectable
getMatchedElement
in interface ITreeSelectable
getMatchedElement
in class AbstractHierarchicalSelectable
criterion
- TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.SeleniumPlusException
- if Element cannot be foundAbstractSelectable.getContent()
protected TreeNode convertTo(Element element) throws SeleniumPlusException
convertTo
in class AbstractHierarchicalSelectable
element
- Element, the Element object to castSeleniumPlusException
- if the Element object cannot be cast to HierarchicalElement.Copyright © SAS Institute. All Rights Reserved.