Package com.cmobilecom.af.test.api
Interface MenuBean
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
containsTrigger()
Does this menuBean contain a trigger to show the menu? When a menuBean contains a trigger, its menu nodes are not visible.default MenuNode
getMenuNode(boolean errorIfNotFound, boolean nameLocalized, java.lang.String... namePath)
Get the menu node with the name path from root.MenuNode
getMenuNode(boolean errorIfNotFound, boolean nameLocalized, java.util.ResourceBundle resourceBundle, java.lang.String... namePath)
Get the menu node with the name path from root.default MenuNode
getMenuNode(boolean nameLocalized, java.lang.String... namePath)
Get the menu node with the name path from root.default MenuNode
getMenuNode(java.lang.String... namePath)
Get the menu node with the name path from root.default MenuNode
getMenuNodeWithCommand(java.lang.String command)
Get menu node with the command.MenuNode
getMenuNodeWithCommand(java.lang.String command, boolean errorIfNotFound)
Get menu node with the command.java.util.List<MenuNode>
getTopMenuNodes()
Get the top menu nodes under invisible root.-
Methods inherited from interface com.cmobilecom.af.test.api.Bean
getContainerBean
-
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
-
getTopMenuNodes
java.util.List<MenuNode> getTopMenuNodes()
Get the top menu nodes under invisible root.- Returns:
- a list of menu nodes. return empty list if none.
- Since:
- 5.13
-
getMenuNode
default MenuNode getMenuNode(java.lang.String... namePath)
Get the menu node with the name path from root. resource bundle will be used to translate the names to match menu node visible names.- Parameters:
namePath
- menu node display name path from the root of this menu bean- Returns:
- a MenuNode instance
- Throws:
java.lang.IllegalArgumentException
- throw if the menuNode is not found
-
getMenuNode
default MenuNode getMenuNode(boolean nameLocalized, java.lang.String... namePath)
Get the menu node with the name path from root.- Parameters:
nameLocalized
- whether the menu node names are localized. If false, resource bundle will be used to translate the names to match menu node visible names.namePath
- menu node display name path from the root of this menu bean- Returns:
- a MenuNode instance
- Throws:
java.lang.IllegalArgumentException
- throw if the menuNode is not found- Since:
- 5.13
-
getMenuNode
default MenuNode getMenuNode(boolean errorIfNotFound, boolean nameLocalized, java.lang.String... namePath)
Get the menu node with the name path from root.- Parameters:
errorIfNotFound
- whether to throw exception if not foundnameLocalized
- whether the menu node names are localized. If false, resource bundle will be used to translate the names to match menu node visible names.namePath
- menu node display name path from the root of this menu bean- Returns:
- a MenuNode instance. return null if not found
- Throws:
java.lang.IllegalArgumentException
- throw if the menuNode is not found and errorIfNotFound is true- Since:
- 5.13
-
getMenuNode
MenuNode getMenuNode(boolean errorIfNotFound, boolean nameLocalized, java.util.ResourceBundle resourceBundle, java.lang.String... namePath)
Get the menu node with the name path from root.- Parameters:
errorIfNotFound
- whether to throw exception if not foundnameLocalized
- whether the menu node names are localized. If false, resource bundle will be used to translate the names to match menu node visible names.resourceBundle
- resourceBundle. default to Component.getResourceBundle() if nullnamePath
- menu node display name path from the root of this menu bean- Returns:
- a MenuNode instance. return null if not found
- Throws:
java.lang.IllegalArgumentException
- throw if the menuNode is not found and errorIfNotFound is true- Since:
- 5.15
-
getMenuNodeWithCommand
default MenuNode getMenuNodeWithCommand(java.lang.String command)
Get menu node with the command.- Parameters:
command
- command name- Returns:
- a MenuNode instance
- Throws:
java.lang.IllegalArgumentException
- throw if the menuNode is not found
-
getMenuNodeWithCommand
MenuNode getMenuNodeWithCommand(java.lang.String command, boolean errorIfNotFound)
Get menu node with the command.- Parameters:
command
- command nameerrorIfNotFound
- whether to throw exception if not found- Returns:
- a MenuNode instance. return null if not found and errorIfNotFound is false
- Throws:
java.lang.IllegalArgumentException
- throw if the menuNode is not found and errorIfNotFound is true
-
containsTrigger
boolean containsTrigger()
Does this menuBean contain a trigger to show the menu? When a menuBean contains a trigger, its menu nodes are not visible.- Returns:
- true if it contains trigger, false otherwise
- Since:
- 5.16
-
-