This function verifies a SapGui radio button control. It can be used to ensure whether a radio button is checked or not checked.
SapGui.bdh
SapGuiVerifyRadioValue( in sControlId : string, in bValue : boolean, in nOptions : number optional, in nSeverity : number optional := SEVERITY_ERROR ) : boolean;
Parameter | Description |
---|---|
sControlId | The unique id of a checkbox control |
bValue | This parameter is set to "true" if the check as specified in the third parameter results in success. Otherwise it is set to "false". |
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.3);
SapGuiLogon("ddic", "*******", "000", "");
// SAP Easy Access
SapGuiIgnoreError(SAPENGINE_STATUSBAR_CHANGED, SEVERITY_SUCCESS);
SapGuiSetActiveWindow("wnd[0]", "SAP Easy Access", SAPGUI_MATCH_ExactNoCase);
SapGuiIgnoreError(SAPENGINE_STATUSBAR_CHANGED, SEVERITY_SUCCESS);
ThinkTime(5.9);
SapGuiPressButton("tbar[1]/btn[17]", " Other menu");
ThinkTime(2.7);
SapGuiSetActiveWindow("wnd[1]", "Wertebereich einschränken", SAPGUI_MATCH_ExactNoCase);
SapGuiSetFocus("usr/tabsG_SELONETABSTRIP/tabpTAB002/chkG_SELPOP_STATE-BUTTON");
SapGuiSetCheckbox("usr/tabsG_SELONETABSTRIP/220/chkG_SELPOP_STATE-BUTTON", true, "No restriction");
SapGuiVerifyRadioValue( "/usr/tabsG_SELONETABSTRIP/DH4:0220/chkG_SELPOP_RADIO-BUTTON", true, SAPGUI_VERIFY_EQUAL, SEVERITY_ERROR);
end TMain;