Description:
- A menu bar is the component typically found at the top of an application window.
- It typically contains menus such as ''File'', ''Edit'', ''Help'', etc.
Because the forward slash (/) is a special symbol for menus, if you want to use a slash as part of your parameter value, you have to mask it. See the section later in this document 9 for more details.
Mapping menu bars
Menu bars do not need to be mapped in the Object Mapping Mode as they are automatically found during test execution.
![\includegraphics[height=2cm]{lightbulb}](img1.jpg) |
Actions on menus are not supported in the HTML toolkit. |
Synopsis:
New Actions |
Name |
Type |
Parameters |
Check Enablement of Entry by Indexpath |
e |
String:Indexpath Boolean:Enabled
|
CONCRETE_MenuBar_VerifyEnabledByIndexpath |
Check Enablement of Entry by Textpath |
e |
String:Menupath String:Operator Boolean:Enabled
|
CONCRETE_MenuBar_VerifyEnabledByTextpath |
Check Existence of Entry by Indexpath |
e |
String:Indexpath Boolean:Exists
|
CONCRETE_MenuBar_VerifyExistsByIndexpath |
Check Existence of Entry by Textpath |
e |
String:Menupath String:Operator Boolean:Exists
|
CONCRETE_MenuBar_VerifyExistsByTextpath |
Check Selection of Entry by Indexpath |
e |
String:Indexpath Boolean:Selected
|
CONCRETE_MenuBar_VerifySelectedByIndexpath |
Check Selection of Entry by Textpath |
e |
String:Menupath String:Operator Boolean:Selected
|
CONCRETE_MenuBar_VerifySelectedByTextpath |
Select Menu Entry by Indexpath |
e |
String:Indexpath
|
CONCRETE_MenuBar_SelectMenuItemByIndexpath |
Select Menu Entry by Textpath |
e |
String:Menupath String:Operator
|
CONCRETE_MenuBar_SelectMenuItem |
Wait for Component |
e |
Integer:Timeout in ms Integer:Delay after Visibility
|
CONCRETE_MenuBar_WaitForComponent |
Inherited Actions
none
Check Enablement of Entry by Indexpath
- Use this action to check the enablement status of an item in a menu bar.
- The item to check is given using the indexpath to the item.
Parameters
Name |
Data Type |
Values |
Default |
Indexpath |
String |
- |
none |
Use this parameter to specify the menupath to the item you want to check.Make sure you give the whole menupath (start from the very beginning of the menu).
- Enter the path to the item as an indexpath.
- Use slash '/' as a path separator (to separate parent nodes from child nodes).
- For example, "1/2".
![\includegraphics[height=2cm]{lightbulb}](img1.jpg) |
The first node is '1' |
Name |
Data Type |
Values |
Default |
Enabled |
Boolean |
true false
|
true |
- Set this parameter to true if you expect the menu item to be enabled.
- Set the parameter to false if you expect the menu item to be disabled.
Check Enablement of Entry by Textpath
- Use this action to check whether an item in a menu is enabled.
- The item to check is given using the textpath to the item.
Parameters
Name |
Data Type |
Values |
Default |
Menupath |
String |
- |
none |
Use this parameter to specify the menupath to the item you want to check. Make sure you enter the whole menupath.
- Enter the path to the item as a textpath.
- Use slash '/' as a path separator (to separate parent nodes from child nodes).
- For example, "File/Open" or "Category/Horror".
- Either make sure that your path is written exactly as it appears in the interface, or use a regular expression to match the text.
- Each segment of the path will be used to find a corresponding node, using the operator provided.
Name |
Data Type |
Values |
Default |
Operator |
String |
equals not equals matches simple match
|
equals |
- The operator parameter has four possible values.
- "not equals" looks for something that does not exactly match.
- "equals" looks for an exact match.
- Select "simple match" to use a simple match expression 3.
- Select "matches" to use a regular expression 3.
- Regardless of the operator used: If there is more than one match, the first found will be chosen.
Name |
Data Type |
Values |
Default |
Enabled |
Boolean |
true false
|
true |
- Set this parameter to true if you expect the menu item to be enabled.
- Set the parameter to false if you expect the menu item to be disabled.
Check Existence of Entry by Indexpath
- Use this action to check the existence of an item in a menu bar.
- The item to check is given using the indexpath to the item.
Parameters
Name |
Data Type |
Values |
Default |
Indexpath |
String |
- |
none |
Use this parameter to specify the menupath to the item you want to check. Make sure you give the whole menupath (start from the very beginning of the menu).
- Enter the path to the item as an indexpath.
- Use slash '/' as a path separator (to separate parent nodes from child nodes).
- For example, "1/2".
![\includegraphics[height=2cm]{lightbulb}](img1.jpg) |
The first node is '1' |
Name |
Data Type |
Values |
Default |
Exists |
Boolean |
true false
|
true |
- Set this parameter to true if you expect the menu item to exist.
- Set the parameter to false if you expect the menu item to not exist.
Check Existence of Entry by Textpath
- Use this action to check the existence of an item in a menu bar.
- The item to check is given using the textpath to the item.
Parameters
Name |
Data Type |
Values |
Default |
Menupath |
String |
- |
none |
Use this parameter to specify the menupath to the item you want to check. Make sure you enter the whole path.
- Enter the path to the item as a textpath.
- Use slash '/' as a path separator (to separate parent nodes from child nodes).
- For example, "File/Open" or "Category/Horror".
- Either make sure that your path is written exactly as it appears in the interface, or use a regular expression to match the text.
- Each segment of the path will be used to find a corresponding node, using the operator provided.
Name |
Data Type |
Values |
Default |
Operator |
String |
equals not equals matches simple match
|
equals |
- The operator parameter has four possible values.
- "not equals" looks for something that does not exactly match.
- "equals" looks for an exact match.
- Select "simple match" to use a simple match expression 3.
- Select "matches" to use a regular expression 3.
- Regardless of the operator used: If there is more than one match, the first found will be chosen.
Name |
Data Type |
Values |
Default |
Exists |
Boolean |
true false
|
true |
- Set this parameter to true if you expect the menu item to exist.
- Set the parameter to false if you expect the menu item to not exist.
Check Selection of Entry by Indexpath
- Use this action to check whether an item in a menu is selected.
- You enter the menupath to the item, and whether you expect it to be selected or not.
- The menupath is given as an indexpath.
Parameters
Name |
Data Type |
Values |
Default |
Indexpath |
String |
- |
none |
Use this parameter to specify the menupath to the item you want to check. Make sure you give the whole menupath (start from the very beginning of the menu).
- Enter the path to the item as an indexpath.
- Use slash '/' as a path separator (to separate parent nodes from child nodes).
- For example, "1/2".
![\includegraphics[height=2cm]{lightbulb}](img1.jpg) |
The first node is '1' |
Name |
Data Type |
Values |
Default |
Selected |
Boolean |
true false
|
true |
- Set this parameter to true if you expect the menu item to be selected.
- Set this parameter to false if you expect the menu item not to be selected.
Check Selection of Entry by Textpath
- Use this action to check whether an item in a menu is selected.
- You enter the menupath to the item, and whether you expect it to be selected or not.
- The menupath is given as a textpath.
Parameters
Name |
Data Type |
Values |
Default |
Menupath |
String |
- |
none |
Use this parameter to specify the menupath to the item you want to check. Make sure you enter the whole path.
- Enter the path to the item as a textpath.
- Use slash '/' as a path separator (to separate parent nodes from child nodes).
- For example, "File/Open" or "Category/Horror".
- Either make sure that your path is written exactly as it appears in the interface, or use a regular expression to match the text.
- Each segment of the path will be used to find a corresponding node, using the operator provided.
Name |
Data Type |
Values |
Default |
Operator |
String |
equals not equals matches simple match
|
equals |
- The operator parameter has four possible values.
- "not equals" looks for something that does not exactly match.
- "equals" looks for an exact match.
- Select "simple match" to use a simple match expression 3.
- Select "matches" to use a regular expression 3.
- Regardless of the operator used: If there is more than one match, the first found will be chosen.
Name |
Data Type |
Values |
Default |
Selected |
Boolean |
true false
|
true |
- Set this parameter to true if you expect the menu item to be selected.
- Set this parameter to false if you expect the menu item not to be selected.
Select Menu Entry by Indexpath
- Use this action to select an item from a menu bar.
- The item you want to select is given using the indexpath to the item.
Parameters
Name |
Data Type |
Values |
Default |
Indexpath |
String |
- |
none |
Use this parameter to specify the menupath to the item you want to select.Make sure you give the whole menupath (start from the very beginning of the menu).
- Enter the path to the item as an indexpath.
- Use slash '/' as a path separator (to separate parent nodes from child nodes).
- For example, "1/2".
![\includegraphics[height=2cm]{lightbulb}](img1.jpg) |
The first node is '1' |
Select Menu Entry by Textpath
- Use this action to select an item from a menu bar.
- The item you want to select is given using the textpath to the item.
Parameters
Name |
Data Type |
Values |
Default |
Menupath |
String |
- |
none |
Use this parameter to specify the menupath to the item you want to select. Make sure you enter the whole path.
- Enter the path to the item as a textpath.
- Use slash '/' as a path separator (to separate parent nodes from child nodes).
- For example, "File/Open" or "Category/Horror".
- Either make sure that your path is written exactly as it appears in the interface, or use a regular expression to match the text.
- Each segment of the path will be used to find a corresponding node, using the operator provided.
Name |
Data Type |
Values |
Default |
Operator |
String |
equals not equals matches simple match
|
equals |
- The operator parameter has four possible values.
- "not equals" looks for something that does not exactly match.
- "equals" looks for an exact match.
- Select "simple match" to use a simple match expression 3.
- Select "matches" to use a regular expression 3.
- Regardless of the operator used: If there is more than one match, the first found will be chosen.
Wait for Component
- The wait for menu action lets you wait until the menu is present/loaded before continuing with the next Test Step .
Parameters
Name |
Data Type |
Values |
Default |
Timeout in ms |
Integer |
- |
1000 |
- Enter the amount of time (in milliseconds) Jubula should wait before the Test Step fails.
- If the menu does not appear in this time frame, the Test Step is unsuccessful.
Name |
Data Type |
Values |
Default |
Delay after Visibility |
Integer |
- |
200 |
- Sometimes a widget is not ready to receive events (mouse clicks, key presses) until a few moments after becoming visible.
- Use this parameter to set the amount of time (in milliseconds) to wait once the widget has appeared before continuing.
Copyright BREDEX GmbH 2011. Made available under the Eclipse Public License v1.0.