FRM
v1.4.2

std
Script emos_std_menue_lib

CompiledModule
  |
  +--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.

Tsl
emos_std_menue_lib.tsl

Function Summary
 String DOS_menu_select_item(in win, in item)
          This function is specially designed for a particular DOS application.
 String 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.
 String 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.
 String EMOS_menu_is_complete_path_selection()
          Returns TRUE if COMPLETE_PATH selection is activated.
 String EMOS_menu_is_last_entry_selection()
          Returns TRUE if LAST_ENTRY selection is activated.
 String 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.
protected  String EMOS_menu_item(in action, in item, in attr, in inInfo, out outInfo, in time, in window)
          This function implements the actual logic for processing menu items that are not in the GUI-map.
 String EMOS_menu_select_item(in gui1, in win1, in men1, inout win2)
          This function implements an alternative for native menu_select_item().
 String EMOS_menu_select_item1(in item, in win)
          This function clicks on a menu item without requiring items to be learned.
 String EMOS_menu_select_item2(in item)
          This function clicks on a menu item without requiring items to be learned.
 String EMOS_menu_set_complete_path_selection()
          Call this function to cause menu_select_item to select the complete menu path.
 String 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.
 String 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.
 String excep1(in rc, in func)
          The empty (does nothing) exception handler needed for menu_select_item1().
 String menu_select_item1(in gui, in win1, in men1, in ttt1, out gui2, inout win2, out menu_str)
           
 

Function Detail

EMOS_menu_set_complete_path_selection

public String 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 String 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_is_complete_path_selection

public String 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 String EMOS_menu_is_last_entry_selection()
Returns TRUE if LAST_ENTRY selection is activated.

Returns:
TRUE if LAST_ENTRY selection FALSE otherwise

DOS_menu_select_item

public String 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_select_item1

public String 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_get_info1

public String 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_wait_info1

public String 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

EMOS_menu_check_info1

public String 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_item

protected String EMOS_menu_item(in action,
                                in item,
                                in attr,
                                in inInfo,
                                out outInfo,
                                in time,
                                in window)
This function implements the actual logic for processing menu items that are not in the GUI-map.

Parameters:
action - action to be performed
item - the item to be selected
attr - [optional] attribute to be examined
inInfo - [optional] info to be used
outInfo - (out) [optional] info to be returned
time - [optional] time to be waited for
Returns:
E_OK: cuccess !E_OK: failure

EMOS_menu_item_via_text

public String 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_item2

public String 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_select_item

public String 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

excep1

public String 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 String menu_select_item1(in gui,
                                in win1,
                                in men1,
                                in ttt1,
                                out gui2,
                                inout win2,
                                out menu_str)

FRM
v1.4.2