This function verifies a SapGui check box attached to an item in a SapGui tree. It can be used to ensure whether a check box is checked or not checked.
SapGui.bdh
SapGuiVerifyTreeCheckbox( in sControlId : string, in sNode : string, in sItem : string, in bValue : boolean, in nOptions : number optional, in nSeverity : number optional := SEVERITY_ERROR ) : boolean;
Parameter | Description |
---|---|
sControlId | The unique id of a tree control. |
sNode | Specifies the node of the tree. |
sItem | The item where the checkbox is located. |
bValue | The value to be verified. |
nOptions | This parameter specifies the type of check to be performed. Available options are:
|
nSeverity |
Optional: Severity of the error that is raised if the verification fails. Can be one of the following values:
|
transaction TMain
var
sConnID : string;
begin
// Connecting to SAP
sConnID := SapGuiOpenConnection( " /SAP_CODEPAGE=1100 /FULLMENU 10.5.2.132 0 /3");
SapGuiSetActiveConnection(sConnID);
SapGuiSetActiveSession("ses[0]");
// SAP
SapGuiSetActiveWindow("wnd[0]", "SAP", SAPGUI_MATCH_ExactNoCase);
SapGuiWindowAction(SAPGUI_WND_MAXIMIZE);
// Logon to SAP System
// Before running a test you have to customize the password parameter!
ThinkTime(2.0);
SapGuiLogon("ddic", "*******", "000", "");
// SAP Easy Access
SapGuiIgnoreError(SAPENGINE_STATUSBAR_CHANGED, SEVERITY_SUCCESS);
ThinkTime(3.7);
SapGuiSetActiveWindow("wnd[0]", "SAP Easy Access", SAPGUI_MATCH_ExactNoCase);
// NodeName: Office
// NodePath: 2\1
ThinkTime(7.3);
SapGuiTreeExpandNode( "usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell", "Office", 0000000003", "Expand\\Office");
SapGuiTreeExpandNode( "usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell", "Telephone Integration", 0000000005", "Expand\\Telephone Integration");
SapGuiVerifyTreeCheckbox( "usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell", "Office", "0000000003", true, SAPGUI_VERIFY_EQUAL, SEVERITY_ERROR);
end TMain;