class Menu.DefaultSelectable_Menu extends AbstractMenuSelectable
contentObjects, DEFAULT_WAIT_TIMEparent| Constructor and Description | 
|---|
| DefaultSelectable_Menu(Component parent) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | expandItem(MenuItem 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. | 
| MenuItem[] | 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() | 
| MenuItem | getMatchedElement(TextMatchingCriterion criterion)This method override that of superclass. | 
| java.lang.String[] | getSupportedClassNames() | 
| protected boolean | isShowOnPage(Element element)For menu, the menuitem is usually NOT shown on page. The method EmbeddedObject.isShowOnPage(Element)in super-class willtry to search the related web-element (which doesn't exist yet) and will waste a lot of time. So override it, and just return false, so that we will always call showOnPage(Element)to make it visible on page and can be selected correctly. | 
| boolean | isSupported(org.openqa.selenium.WebElement element)Test if the element is supported. | 
| protected void | showOnPage(Element element)Make the element is in 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. | 
convertTo, verifyItemSelected, verifyMenuItem, waitAndVerifyItemSelectedactivateItem, selectItem, verifyItemSelectionactivateItem, clearCache, clickElement, getCacheableContent, selectItem, verifyContains, verifyItemSelection, verifyItemSelection, waitElementReady, waitElementReadyrefresh, webelementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivateItem, activateItem, selectItem, selectItem, verifyContains, verifyItemSelection, verifyItemSelectionclearCachepublic DefaultSelectable_Menu(Component parent) throws SeleniumPlusException
parent - SeleniumPlusExceptionpublic boolean isSupported(org.openqa.selenium.WebElement element)
EmbeddedObjectisSupported in interface SupportableisSupported in class EmbeddedObjectelement - WebElement, the element to check.public java.lang.String[] getSupportedClassNames()
public MenuItem[] getContent() throws SeleniumPlusException
AbstractSelectableAbstractSelectable.getCacheableContent(),AbstractSelectable.getCacheableContent()getContent in interface IHierarchicalSelectablegetContent in interface IMenuSelectablegetContent in interface ISelectablegetContent in class AbstractMenuSelectableSeleniumPlusExceptionAbstractSelectable.getCacheableContent()public MenuItem getMatchedElement(TextMatchingCriterion criterion) throws SeleniumPlusException
getMatchedElement in interface IMenuSelectablegetMatchedElement in interface ISelectablegetMatchedElement in class AbstractMenuSelectablecriterion - TextMatchingCriterion, containing text, partialMatch, matchedIndex as search-criterion.SeleniumPlusException - if Element cannot be foundAbstractSelectable.getContent()protected void showOnPage(Element element) throws SeleniumPlusException
AbstractSelectableEmbeddedObject.isShowOnPage(Element) firstly.showOnPage in class AbstractSelectableelement - Element, the element needs to be visible on pageSeleniumPlusException#isShowOnPage(Element)}protected void expandItem(MenuItem node, boolean expandChildren) throws SeleniumPlusException
SeleniumPlusExceptionprotected boolean isShowOnPage(Element element) throws SeleniumPlusException
EmbeddedObject.isShowOnPage(Element) in super-class willshowOnPage(Element)isShowOnPage in class EmbeddedObjectelement - Element, the element to checkSeleniumPlusExceptionEmbeddedObject.isShowOnPage(Element)Copyright © SAS Institute. All Rights Reserved.