Package com.cmobilecom.af.test.api
Interface MenuNode
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
click()
Click this menu node.void
click(java.lang.String expectedConfirmAlertText, boolean accept, java.lang.String redirectURLPattern)
Click this menu node, and accept or dismiss confirm alert.void
expandToggle()
Expand or collapse this menu node so that its child nodes are visible or invisible.MenuNode
getChildNode(int index)
GEt child menu node at the index.java.util.List<MenuNode>
getChildNodes()
Get child menu nodes.EntityBean
getInputDataBean()
Get the inputData bean (if any) as command parameters.EntityProperty
getInputDataDefaultProperty()
Get the default property of this menu node's inputDataBean, which has only one default property named "value".EntityProperty
getInputDataProperty(java.lang.String name)
Get the property of this menu node's inputDataBean.MenuBean
getMenuBean()
Get the menu bean to which this menu node belongs.MenuNode
getParentNode()
Get parent menu node.boolean
isDisabled()
Is this menu node disabled and not interactable?boolean
isDisplayed()
Is this menu node displayed (visible)?boolean
isExpanded()
Is this menu node expanded so that its child nodes are visible?boolean
isLeaf()
Is this menu node a leaf?default EntityBean
openInputDataBean()
Open this menu node's inputDataBean.-
Methods inherited from interface com.cmobilecom.af.test.api.Component
getAncestorCount, getClosestAncestor, getCurrencyNumberFormat, getDateTimeFormatter, getDriver, getElementText, getLocale, getNumberFormat, getParent, getPercentNumberFormat, getResourceBundle, getRoot, isOverlapped, isStale, isVisible, refresh, waitUntilAbsent, waitUntilClickable, waitUntilInvisible, waitUntilPresent, waitUntilStale, waitUntilStale, waitUntilVisible
-
-
-
-
Method Detail
-
getMenuBean
MenuBean getMenuBean()
Get the menu bean to which this menu node belongs.- Returns:
- MenuBean instance
-
click
default void click()
Click this menu node.
-
click
void click(java.lang.String expectedConfirmAlertText, boolean accept, java.lang.String redirectURLPattern)
Click this menu node, and accept or dismiss confirm alert.- Parameters:
expectedConfirmAlertText
- expected confirm alert text(whole or partial)accept
- whether to accept or dismiss the alertredirectURLPattern
- if not null, wait for redirecting to a URL that contains the pattern
-
getInputDataBean
EntityBean getInputDataBean()
Get the inputData bean (if any) as command parameters.- Returns:
- input data bean. return null if there is no input data bean.
-
isDisabled
boolean isDisabled()
Is this menu node disabled and not interactable?- Returns:
- true if disabled, false otherwise
- Since:
- 5.19
-
isExpanded
boolean isExpanded()
Is this menu node expanded so that its child nodes are visible?- Returns:
- true if expanded, false otherwise
-
isDisplayed
boolean isDisplayed()
Is this menu node displayed (visible)?- Returns:
- true if displayed, false otherwise
-
expandToggle
void expandToggle()
Expand or collapse this menu node so that its child nodes are visible or invisible. Different from click, expanding or collapsing a menu node will not execute the command of this menu node.
-
isLeaf
boolean isLeaf()
Is this menu node a leaf?- Returns:
- true if leaf, false otherwise
-
getParentNode
MenuNode getParentNode()
Get parent menu node.- Returns:
- parent menu node. return null if there is no parent.
-
getChildNodes
java.util.List<MenuNode> getChildNodes()
Get child menu nodes.- Returns:
- a list of menu nodes. return empty if there is no children.
-
getChildNode
MenuNode getChildNode(int index)
GEt child menu node at the index.- Parameters:
index
- zero-based index- Returns:
- MenuNode instance. return null if not found.
-
getInputDataDefaultProperty
EntityProperty getInputDataDefaultProperty()
Get the default property of this menu node's inputDataBean, which has only one default property named "value".- Returns:
- EntityProperty instance. return null if it is not found
-
getInputDataProperty
EntityProperty getInputDataProperty(java.lang.String name)
Get the property of this menu node's inputDataBean.- Parameters:
name
- property name- Returns:
- EntityProperty instance. return null if it is not found
-
openInputDataBean
default EntityBean openInputDataBean()
Open this menu node's inputDataBean. If the inputDataBean is not visible, click this menuNode to open it.- Returns:
- inputDataBean
- Since:
- 5.17
-
-