public static class Menu.SapSelectable_Menu extends AbstractMenuSelectable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME_COMMONS_MENUITEM |
static java.lang.String |
CLASS_NAME_COMMONS_TEXTMENUITEM |
static java.lang.String |
CLASS_NAME_MENU |
static java.lang.String |
CLASS_NAME_MENUBAR |
static java.lang.String |
CLASS_NAME_UNIFIED_MENU |
static java.lang.String |
CLASS_NAME_UNIFIED_MENUITEM |
static java.lang.String |
CLASS_NAME_UNIFIED_TEXTMENUITEM |
static java.lang.String[] |
menuClazzes |
static java.lang.String[] |
menuItemClazzes |
static java.lang.String[] |
supportedClazzes |
static java.lang.String[] |
textMenuItemClazzes |
contentObjects, DEFAULT_WAIT_TIME
parent
Constructor and Description |
---|
SapSelectable_Menu(Component component) |
Modifier and Type | Method and Description |
---|---|
protected void |
expandItem(MenuItem item,
boolean expandChildren)
Expand the menuitem by click their ancestor item on the path level by level.
|
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() |
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. |
protected void |
showOnPage(Element element)
In this implementation, we call
expandItem(MenuItem, boolean) to clickitem on the path level by level. |
convertTo, getMatchedElement, verifyItemSelected, verifyMenuItem, waitAndVerifyItemSelected
activateItem, selectItem, verifyItemSelection
activateItem, clearCache, clickElement, getCacheableContent, selectItem, verifyContains, verifyItemSelection, verifyItemSelection, waitElementReady, waitElementReady
isSupported, refresh, webelement
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activateItem, activateItem, selectItem, selectItem, verifyContains, verifyItemSelection, verifyItemSelection
clearCache
public static final java.lang.String CLASS_NAME_MENUBAR
public static final java.lang.String CLASS_NAME_MENU
public static final java.lang.String CLASS_NAME_UNIFIED_MENU
public static final java.lang.String[] supportedClazzes
public static final java.lang.String[] menuClazzes
public static final java.lang.String CLASS_NAME_COMMONS_MENUITEM
public static final java.lang.String CLASS_NAME_UNIFIED_MENUITEM
public static final java.lang.String[] menuItemClazzes
public static final java.lang.String CLASS_NAME_COMMONS_TEXTMENUITEM
public static final java.lang.String CLASS_NAME_UNIFIED_TEXTMENUITEM
public static final java.lang.String[] textMenuItemClazzes
public SapSelectable_Menu(Component component) throws SeleniumPlusException
SeleniumPlusException
public java.lang.String[] getSupportedClassNames()
public MenuItem[] getContent() throws SeleniumPlusException
AbstractSelectable
AbstractSelectable.getCacheableContent()
,AbstractSelectable.getCacheableContent()
getContent
in interface IHierarchicalSelectable
getContent
in interface IMenuSelectable
getContent
in interface ISelectable
getContent
in class AbstractMenuSelectable
SeleniumPlusException
AbstractSelectable.getCacheableContent()
protected void expandItem(MenuItem item, boolean expandChildren) throws SeleniumPlusException
item
- expandChildren
- SeleniumPlusException
protected void showOnPage(Element element) throws SeleniumPlusException
expandItem(MenuItem, boolean)
to clickshowOnPage
in class AbstractSelectable
element
- Element, the element needs to be visible on pageSeleniumPlusException
expandItem(MenuItem, boolean)
protected boolean isShowOnPage(Element element) throws SeleniumPlusException
EmbeddedObject.isShowOnPage(Element)
in super-class willshowOnPage(Element)
isShowOnPage
in class EmbeddedObject
element
- Element, the element to checkSeleniumPlusException
EmbeddedObject.isShowOnPage(Element)
Copyright © SAS Institute. All Rights Reserved.