STD
Class emos_std_menue_lib


public class emos_std_menue_lib

This library contains alternative implementations for standard functions that operate on menues (menu_x() functions). Another sort of functions in this library are functions that implement some additional functionality that would probably fit into Mercury's logic for menu_x() functions.

Stereotype compiled module

Method Summary
 intDOS_menu_select_item(in win, in item)
          This function is specially designed for a particular DOS application.
 intEMOS_menu_check_info1(in item, in attr, in info, in win)
          This function compares the expected with the actual info of a menu item without requiring items to be learned.
 intEMOS_menu_get_info1(in item, in attr, out info, in win)
          This function returns the info of a menu item without requiring items to be learned.
 intEMOS_menu_is_complete_path_selection()
          Returns TRUE if COMPLETE_PATH selection is activated.
 intEMOS_menu_is_last_entry_selection()
          Returns TRUE if LAST_ENTRY selection is activated.
 intEMOS_menu_item_via_text(in item, in arg_win_desc)
          This function clicks on a menu item without requiring items to be learned by untilysing the WinRunner's text recognition cpabilities.
 intEMOS_menu_select_item(in gui1, in win1, in men1, inout win2)
          This function implements an alternative for native menu_select_item().
 intEMOS_menu_select_item1(in item, in win)
          This function clicks on a menu item without requiring items to be learned.
 intEMOS_menu_select_item2(in item)
          This function clicks on a menu item without requiring items to be learned.
 intEMOS_menu_set_complete_path_selection()
          Call this function to cause menu_select_item to select the complete menu path.
 intEMOS_menu_set_last_entry_selection()
          Call this function to cause menu_select_item to select only the last item instead of the complete menu path.
 intEMOS_menu_wait_info1(in item, in attr, in info, in time, in win)
          This function waits for the info of a menu item without requiring items to be learned.
 intexcep1(in rc, in func)
          The empty (does nothing) exception handler needed for menu_select_item1().
 intmenu_select_item1(in gui, in win1, in men1, in ttt1, out gui2, inout win2, out menu_str)
           

Method Detail

DOS_menu_select_item

public int DOS_menu_select_item(in win, in item)
This function is specially designed for a particular DOS application. This application has its own representation of a menu bar. WinRunner is capable of recognising text within the menu bar. This function clicks on a particular string (item) within the menu bar.

NOTE! Please note that position and size of the menu bar is hard-coded.

Parameters:
win - (in) name of the window that contains the menu bar
item - (in) the string to be selected
Returns: E_OK: Success !E_OK: Error

EMOS_menu_check_info1

public int EMOS_menu_check_info1(in item, in attr, in info, in win)
This function compares the expected with the actual info of a menu item without requiring items to be learned.
Parameters:
item - the item to be selected
attr - attribute to be examined
info - info to be checked
win - [optional] window where actions are to be performed
Returns: E_OK: cuccess !E_OK: failure

EMOS_menu_get_info1

public int EMOS_menu_get_info1(in item, in attr, out info, in win)
This function returns the info of a menu item without requiring items to be learned.
Parameters:
item - the item to be selected
attr - attribute to be examined
info - (out) info retrieved
win - [optional] window where actions are to be performed
Returns: E_OK: cuccess !E_OK: failure

EMOS_menu_is_complete_path_selection

public int EMOS_menu_is_complete_path_selection()
Returns TRUE if COMPLETE_PATH selection is activated.
Returns: TRUE if COMPLETE_PATH selection FALSE otherwise

EMOS_menu_is_last_entry_selection

public int EMOS_menu_is_last_entry_selection()
Returns TRUE if LAST_ENTRY selection is activated.
Returns: TRUE if LAST_ENTRY selection FALSE otherwise

EMOS_menu_item_via_text

public int EMOS_menu_item_via_text(in item, in arg_win_desc)
This function clicks on a menu item without requiring items to be learned by untilysing the WinRunner's text recognition cpabilities.

NOTE

This is an alternative to EMOS_menu_item() when this one does not seem to be stable enough (e.g. position of menu entries changes too often). This worked in very well for some applications that we were punished to test.

Parameters:
item - the item to be selected
arg_win_desc - (in) (optional) physical menu window description [default: { class: object, MSW_id: 0, location: %d }]
Returns: E_OK: cuccess !E_OK: failure

EMOS_menu_select_item

public int EMOS_menu_select_item(in gui1, in win1, in men1, inout win2)
This function implements an alternative for native menu_select_item(). Try using it if the native function does not seem to work. For some mysterious reason tis function indeed manages to select more items than the native one. Note the different interface (parameter list). If you need more info, I must disapoint you. You must either dig into the code yourself or try to get in touch with the author. I gave up.
Parameters:
gui1 - (in) gui-File
win1 - (in) window
men1 - (in) menu_item
win2 - (inout) window:
		win2 = "" , dann nur Path von menu_item gibt zurück.		
win2 = "*", dann sucht Name von Window in alle GUI-Filen
(wenn Sie wissen nicht, welche Window taucht auf).		
win2 # "*",dann sucht nicht (wenn Sie wissen, welche Window taucht auf).		
Returns: E_OK: Erfolg !E_OK: 1 - Object != menu-item or menu="sys_" or "parent"="none" 3 - menu-item existiert nicht aufm Bildschirm 4 - keine Beschreibung von aufgerufenem Fenster in GUI-Map 5 - Menu is disabled

EMOS_menu_select_item1

public int EMOS_menu_select_item1(in item, in win)
This function clicks on a menu item without requiring items to be learned.
Parameters:
item - the item to be selected
win - [optional] window where actions are to be performed
Returns: E_OK: cuccess !E_OK: failure

EMOS_menu_select_item2

public int EMOS_menu_select_item2(in item)
This function clicks on a menu item without requiring items to be learned. NOTE: It was a nice try that at some point in time worked or at least seemed to.
Parameters:
item - the item to be selected
Returns: E_OK: cuccess !E_OK: failure

EMOS_menu_set_complete_path_selection

public int EMOS_menu_set_complete_path_selection()
Call this function to cause menu_select_item to select the complete menu path.

Note:
Behaves the same as WinRunner, the only problem is that it does not always work.


EMOS_menu_set_last_entry_selection

public int EMOS_menu_set_last_entry_selection()
Call this function to cause menu_select_item to select only the last item instead of the complete menu path.

Example:
instead of calling menu_select_item( "aaa;bbb;ccc" )
this mode causes menu_select_item( "ccc" ) to be called

Note:
This is the default mode.
It uses an undocumented feature of WR that appears to work more often than the documented one.


EMOS_menu_wait_info1

public int EMOS_menu_wait_info1(in item, in attr, in info, in time, in win)
This function waits for the info of a menu item without requiring items to be learned.
Parameters:
item - the item to be selected
attr - attribute to be examined
info - info to be waited for
time - [optional] time to be waited for
win - [optional] window where actions are to be performed
Returns: E_OK: cuccess !E_OK: failure

excep1

public int excep1(in rc, in func)
The empty (does nothing) exception handler needed for menu_select_item1().
Parameters:
rc - (in)
func - (in)

menu_select_item1

public int menu_select_item1(in gui, in win1, in men1, in ttt1, out gui2, inout win2, out menu_str)