class Tree.DefaultSelectable_Tree extends AbstractTreeSelectable
contentObjects, DEFAULT_WAIT_TIME
parent
Constructor and Description |
---|
DefaultSelectable_Tree(Component parent) |
Modifier and Type | Method and Description |
---|---|
protected void |
collapseItem(TreeNode node,
boolean collpaseChildren)
Collapse the nodes (by double-click).
Note:The second parameter collpaseChildren is not used here. |
protected void |
expandItem(TreeNode node,
boolean expandChildren)
Expand the nodes (by double-click) from the root level by level.
Note:The second parameter expandChildren is not used yet here. |
TreeNode[] |
getCacheableContent()
Get the real-time content from WebElement.
For some components like Tree, Menu etc. |
TreeNode |
getMatchedElement(TextMatchingCriterion criterion)
This method override that of superclass.
|
java.lang.String[] |
getSupportedClassNames() |
boolean |
isSupported(org.openqa.selenium.WebElement element)
Test if the element is supported.
|
protected void |
showOnPage(Element element)
Make the element is inside the container, and visible on the page.
For example, some element may not be visible if there are too many elements in its container; User can scroll to make the element visible on the page. User may need to wait for a while so that the element related object can be updated (like position-onscreen, visibility etc.) This method gives a default implementation: it will scroll and align the top of element to the top of container. Before this method is called, it is suggested to call EmbeddedObject.isShowOnPage(Element) firstly.This method will be override by sub-class. |
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 |
verifyItemSelected(Element element)
Note:In subclass, we need to update the 'selected' property of Element.
Please call AbstractSelectable.waitAndVerifyItemSelected(Element) instead to verify selection,as the first method will also try the wait for element to be ready and call EmbeddedObject.refresh(boolean) . |
collapseItem, convertTo, expandItem, getContent, verifyItemExpension
activateItem, selectItem, verifyItemSelection
activateItem, clearCache, clickElement, selectItem, verifyContains, verifyItemSelection, verifyItemSelection, waitAndVerifyItemSelected, waitElementReady, waitElementReady
isShowOnPage, refresh, webelement
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activateItem, activateItem, selectItem, selectItem, verifyContains, verifyItemSelection, verifyItemSelection
clearCache
public DefaultSelectable_Tree(Component parent) throws SeleniumPlusException
parent
- SeleniumPlusException
public boolean isSupported(org.openqa.selenium.WebElement element)
EmbeddedObject
isSupported
in interface Supportable
isSupported
in class EmbeddedObject
element
- WebElement, the element to check.public java.lang.String[] getSupportedClassNames()
public TreeNode[] getCacheableContent() throws SeleniumPlusException
AbstractSelectable
AbstractSelectable.getContent()
so that the retrived contentAbstractSelectable.getContent()
will use the content in the cache.getCacheableContent
in class AbstractSelectable
SeleniumPlusException
AbstractSelectable.getContent()
public TreeNode getMatchedElement(TextMatchingCriterion criterion) throws SeleniumPlusException
getMatchedElement
in interface ISelectable
getMatchedElement
in interface ITreeSelectable
getMatchedElement
in class AbstractTreeSelectable
criterion
- TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.SeleniumPlusException
- if Element cannot be foundAbstractSelectable.getContent()
protected void showOnPage(Element element) throws SeleniumPlusException
AbstractSelectable
EmbeddedObject.isShowOnPage(Element)
firstly.showOnPage
in class AbstractSelectable
element
- Element, the element needs to be visible on pageSeleniumPlusException
#isShowOnPage(Element)}
protected void expandItem(TreeNode node, boolean expandChildren) throws SeleniumPlusException
expandItem
in class AbstractTreeSelectable
node
- TreeNode, the node to expand.expandChildren
- boolean, if true then expand all the children of this node.SeleniumPlusException
protected void collapseItem(TreeNode node, boolean collpaseChildren) throws SeleniumPlusException
collapseItem
in class AbstractTreeSelectable
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
AbstractTreeSelectable
verifyItemExpanded
in class AbstractTreeSelectable
node
- TreeNodeSeleniumPlusException
protected void verifyItemSelected(Element element) throws SeleniumPlusException
AbstractSelectable
AbstractSelectable.waitAndVerifyItemSelected(Element)
instead to verify selection,EmbeddedObject.refresh(boolean)
.verifyItemSelected
in class AbstractSelectable
element
- Element, the element to verify that it is selected.SeleniumPlusException
Copyright © SAS Institute. All Rights Reserved.