Selects a menu from the SapGui menu bar.
SapGui.bdh
SapGuiSelectMenu( in sControlId : string allownull, in sTimer : string optional ) : boolean;
Parameter | Description |
---|---|
sControlId | The uniquely identifying id of a menu item. |
sTimer | Timer name used for measurements. |
transaction TMain
var
sConnId : string;
begin
// Connecting to SAP
sConnID := SapGuiOpenConnection(" /SAP_CODEPAGE=1100 /FULLMENU 10.5.2.198 0 /3");
SapGuiSetActiveConnection(sConnID);
SapGuiSetActiveSession("ses[0]");
// SAP
SapGuiSetActiveWindow("wnd[0]", "SAP", SAPGUI_MATCH_Exact);
SapGuiWindowAction(SAPGUI_WND_MAXIMIZE);
// Logon to SAP System
// Before running a test you have to customize the password parameter!
SapGuiIgnoreError(SAPENGINE_STATUSBAR_CHANGED, SEVERITY_SUCCESS);
ThinkTime(2.9);
SapGuiLogon("ddic", "*******", "000", "");
// Copyright
SapGuiSetActiveWindow("wnd[1]", "Copyright", SAPGUI_MATCH_Exact);
SapGuiPressButton("tbar[0]/btn[0]");
// SAP Easy Access
ThinkTime(17.0);
SapGuiSetActiveWindow("wnd[0]", "SAP Easy Access", SAPGUI_MATCH_Exact);
SapGuiSelectMenu("mbar/menu[3]/menu[0]");
// System administration information
ThinkTime(6.5);
SapGuiSetActiveWindow("wnd[1]", "System administration information", SAPGUI_MATCH_Exact);
SapGuiPressButton("tbar[0]/btn[12]");
end TMain;