DotNetMenuFunctions::SelectMenuItem
Action to select a menuItem according to its text value.
In RRAFS, this command will work on both JavaMenu items and
JavaPopupMenu items.
For RJ implementation: When Field5 is provided,
the routine first verifies that the specified menuitem exists and exits with error if it does not.
If it does exist then the select found menuitem.
Fields: [ ]=
Optional with Default Value
- [ TextValue = ]
Case-insensitive text of menuItem to select OR an App Map reference.
TextValue is the case-sensitive text of the menuitem to select.
Parent-Child relationships are separated by "->".
Alternatively, the TextValue can be an App Map reference item
used in conjunction with the Component Name (field #3) that
allows us to store explicit menu item text in the App Map.
In RRAFS, this command will work on both JavaMenu items and
JavaPopupMenu items.
Examples:
-
T, WINDOW, FileMenu, SelectMenuItem
This action selects the FileMenu menuitem as defined in the AppMap.
This mode is less desirable as it may not work with compatible engines
made with tools other than Rational Robot.
-
T, WINDOW, FileMenu, SelectMenuItem, "Exit"
This action selects the "Exit" menuItem from the FileMenu as defined in the AppMap.
This mode is less desirable as it may not work with compatible engines
made with tools other than Rational Robot.
-
T, WINDOW, Amenu, SelectMenuItem, "File"
This action selects the "File" menu.
-
T, WINDOW, AMenu, SelectMenuItem, "File->Exit"
This action selects the "Exit" menuitem found in the "File" menu.
-
T, WINDOW, Amenu, SelectMenuItem, "FileOpen"
This action selects the menuItem defined in a "FileOpen" subkey of [AMenu]
from within the App Map.
[How To Read This Reference]
DotNetMenuFunctions::SelectMenuItemContains
Action to select a menuItem according to a partial match of its text value.
In RRAFS, this command will work on both JavaMenu items and
JavaPopupMenu items.
For RJ implementation: When Field5 is provided,
the routine first verifies that the specified menuitem exists and exits with error if it does not.
If it does exist then the select found menuitem.
Fields: [ ]=
Optional with Default Value
- [ TextValue = ]
Case-insensitive substring of menuItem to select OR an App Map reference.
Parent-Child relationships are separated by "->"
Alternatively, the TextValue can be an App Map reference item
used in conjunction with the Component Name (field #3) that
allows us to store explicit menu item text in the App Map.
Note: RJ implementation: this field is required.
Examples:
-
T, WINDOW, FileMenu, SelectMenuItemContains, "exi"
Verify that the FileMenu contains partially path "exi", if exist then select it.
For Example: If a path "Exit CTRL+X" exists in the FileMenu, then select it.
-
T, WINDOW, AMenu, SelectMenuItemContains, "f->exit"
Verify that the AMenu contains partially path "f->exit", if exist then select it.
For Example: If a path "File->Exit CTRL+X" exists in the FileMenu, then select it.
[How To Read This Reference]
DotNetMenuFunctions::VerifyMenuItem
Attempts to verify the a particular menuitem exists in a menu.
The menuitem should be specified in the form
"Menu->Menu->MenuItem CTRL+V" with the full text (ampersands optional),
spaces(if any), and keyboard shortcut text (if any).
(The ampersands precede any character in the menuitem that is underlined.)
This command differs from the WindowFunction.VerifyMenuItem command because
here we are actually seeking a JavaMenu component, not a Window that contains
a menu. Also, we do not currently verify any state information like the
WindowFunctions.VerifyMenuItem command.
Fields: [ ]=
Optional with Default Value
-
MenuItemText
Menu->MenuItem hierarchy string to identify which menuitem to find.
Menu->MenuItem hierarchy string to identify which menuitem to find.
This menu hierarchy IS case-sensitive
TQ String. the full case-sensitive menu item path to select.
Ampersands (&) indicating/preceding underlined characters are optional.
The text must include the full text including spaces and any visible shortcut key
combinations displayed in the text of the menu item.
- [ ExpectedStatus = ]
Expected status string (or part thereof) of the menuitem.
Expected status string (or part thereof) to verify.
Only "Enabled" "Ungrayed" "Grayed" "Disabled" "Checked" "Unchecked" "Menu With N MenuItems" are supported now.
Ex: "Enabled Checked" OR "Grayed UnChecked" etc.
Each item separated by a space will be evaluated separately so
the order of the status items does not matter.
Only the state information of interest needs to be specified.
These status items ARE case-insensitive,space-delimited.
Examples:
[How To Read This Reference]
DotNetMenuFunctions::VerifyMenuItemContains
Attempts to verify the existence of a menuitem found by partial text match.
Attempts to verify the existence of a menuitem found by partial text match.
The menuitem should be specified in the form "Menu->Menu->MenuItem".
(Optional ampersands precede any character in the menuitem that is underlined.)
This command differs from the WindowFunction.VerifyMenuItemContains command because
here we are actually seeking a JavaMenu component, not a Window that contains
a menu. Also, we do not currently verify any state information like the
WindowFunctions.VerifyMenuItemContains command.
Fields: [ ]=
Optional with Default Value
-
MenuItemText
Menu->MenuItem hierarchy string to identify which menuitem to find.
Menu->MenuItem hierarchy string to identify which menuitem to find.
This menu hierarchy IS case-sensitive
TQ String. the case-sensitive menu item path to select.
Ampersands (&) indicating/preceding underlined characters are optional.
The text can be any substring of the full text including spaces and any visible shortcut key
combinations displayed in the text of the menu item.
- [ ExpectedStatus = ]
Expected status string (or part thereof) of the menuitem.
Expected status string (or part thereof) to verify.
Only "Enabled" "Ungrayed" "Grayed" "Disabled" "Checked" "Unchecked" "Menu With N MenuItems" are supported now.
Ex: "Enabled Checked" OR "Grayed UnChecked" etc.
Each item separated by a space will be evaluated separately so
the order of the status items does not matter.
Only the state information of interest needs to be specified.
These status items ARE case-insensitive,space-delimited.
Examples:
-
T, Window, Menu, VerifyMenuItemContains, "Fil->Sav"
Verify that the Menu contains partially path "Fil->Sav".
For Example: If a path "File->Save" exists in the Menu, then the verification is ok.
-
T, Window, Menu, VerifyMenuItemContains, "Fil->Sav","Enabled"
Verify that the Menu contains partially path "Fil->Sav" and it's status is "Enabled".
For Example: If a path "File->Save" exists in the Menu and it's status is "Enabled", then the verification is ok.
[How To Read This Reference]