public class MenuItem extends HierarchicalElement
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_SUBMENUID
'submenuid' used to find the submenu WebElement of this menuitem
|
static java.lang.String |
STATUS_BARBREAK |
static java.lang.String |
STATUS_BITMAP |
static java.lang.String |
STATUS_BREAK |
static java.lang.String |
STATUS_CHECKED |
static java.lang.String |
STATUS_DEFAULT |
static java.lang.String |
STATUS_DISABLED |
static java.lang.String |
STATUS_ENABLED |
static java.lang.String |
STATUS_GRAYED |
static java.lang.String |
STATUS_HILITED |
static java.lang.String |
STATUS_NORMAL |
static java.lang.String |
STATUS_SEPARATOR |
static java.lang.String |
STATUS_SUBMENU_NUM |
static java.lang.String |
STATUS_UNCHECKED |
static java.lang.String |
STATUS_UNGRAYED |
static java.lang.String |
STATUS_UNHILITEED |
protected java.lang.String |
subMenuId |
children, parent, PROPERTY_CHILDREN, PROPERTY_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 |
MenuItem() |
|
MenuItem(java.lang.Object object) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
containsBitMap()
Subclass may need to override this method to get a correct value.
|
MenuItem[] |
getChildren() |
MenuItem |
getParent() |
java.lang.String |
getSubMenuId() |
boolean |
hasSubMenu() |
protected boolean |
isChecked()
Subclass may need to override this method to get a correct value.
|
protected boolean |
isSeparator()
Subclass may need to override this method to get a correct value.
|
boolean |
matchStatus(java.lang.String expectedStatus)
Note: The separator must be a blank " "
|
protected MenuItem[] |
newArray(int length)
Create an array of HierarchicalElement.
Sub class MUST OVERRIDE this method to provide its own array. |
protected MenuItem |
newInstance(java.lang.Object object)
Create an instance of HierarchicalElement.
Sub class MUST OVERRIDE this method to provide its own instance. |
void |
setChildren(HierarchicalElement[] children) |
void |
setSubMenuId(java.lang.String subMenuId) |
protected boolean |
subMenuCountOk(java.lang.String subMenuNumber) |
void |
updateFields()
set/update the class's fields through the underlying WebElement or Map.
|
addChild, addChild, getClickableWebElement, getFullPath, getRootId, parseChildren, parseChildren, reverseChildren, setParent
_getLabel, contentValue, equals, getIconURL, getLabel, isDisabled, isSelected, isVisible, parseWebElementText, setSelected, toString
getAttribute, getCssClass, getEmbeddedObject, getId, getMap, getPossibleRecognitionStrings, getSearchContext, getTagName, getWebElement, initialize, refresh, setCssClass, setId, setPossibleRecognitionStrings, setSearchContext, setTagName, setWebElement
public static final java.lang.String PROPERTY_SUBMENUID
public static final java.lang.String STATUS_ENABLED
public static final java.lang.String STATUS_UNGRAYED
public static final java.lang.String STATUS_DISABLED
public static final java.lang.String STATUS_GRAYED
public static final java.lang.String STATUS_CHECKED
public static final java.lang.String STATUS_UNCHECKED
public static final java.lang.String STATUS_SUBMENU_NUM
public static final java.lang.String STATUS_BITMAP
public static final java.lang.String STATUS_SEPARATOR
public static final java.lang.String STATUS_BARBREAK
public static final java.lang.String STATUS_BREAK
public static final java.lang.String STATUS_HILITED
public static final java.lang.String STATUS_UNHILITEED
public static final java.lang.String STATUS_DEFAULT
public static final java.lang.String STATUS_NORMAL
protected java.lang.String subMenuId
public void updateFields()
updateFields
in class HierarchicalElement
DefaultRefreshable.refresh(boolean)
protected MenuItem newInstance(java.lang.Object object)
HierarchicalElement
newInstance
in class HierarchicalElement
object
- Object, to create an instance of this class.protected MenuItem[] newArray(int length)
HierarchicalElement
newArray
in class HierarchicalElement
length
- int, the length of the arraypublic MenuItem getParent()
getParent
in class HierarchicalElement
public MenuItem[] getChildren()
getChildren
in class HierarchicalElement
public void setChildren(HierarchicalElement[] children) throws SeleniumPlusException
setChildren
in class HierarchicalElement
children
- TreeNode[], an array of TreeNodeSeleniumPlusException
public void setSubMenuId(java.lang.String subMenuId)
public java.lang.String getSubMenuId()
public boolean hasSubMenu()
public boolean matchStatus(java.lang.String expectedStatus)
expectedStatus
- A String contains status of the node item, can be an combination of followings:
protected boolean isChecked()
protected boolean containsBitMap()
protected boolean isSeparator()
protected boolean subMenuCountOk(java.lang.String subMenuNumber)
subMenuNumber,
- String, Represent the number of submenus under this menuCopyright © SAS Institute. All Rights Reserved.