sapgui_is_checkbox_selected

Verification and Data Retrieval Functions

Returns the checkbox state.

int sapgui_is_checkbox_selected( const char *description, const char *checkBoxID, [args,] LAST );
descriptionUser entered text to aid in understanding script
checkBoxIDObject ID Strings
argsOptional Arguments
LAST A marker indicating the end of the argument list. Not required if Optional Arguments are used.

The sapgui_is_checkbox_selected verification function returns the status of a checkbox. The function is True if the checkbox is selected and False if it is cleared.

Return Values

This function returns True (-1) or False (0).

Parameterization

You can parameterize all string (char type) arguments.

Example

The following example uses sapgui_is_checkbox_selected to confirm a successful change of checkbox state.

// Turn checkbox status off (False)
sapgui_set_checkbox("Movie", 
    "False", 
    "usr/chkWBTABLE-MOVIE", 
    BEGIN_OPTIONAL, 
        "AdditionalInfo=sapgui5022", 
    END_OPTIONAL);
// Output is "Checkbox is not set"
if (sapgui_is_checkbox_selected("Confirm Checkbox State", "usr/chkWBTABLE-MOVIE", LAST))
        lr_output_message("Checkbox is set");
    else
        lr_output_message("Checkbox is not set");
// Turn checkbox status on (True)
sapgui_set_checkbox("Movie", 
    "True", 
    "usr/chkWBTABLE-MOVIE", 
    BEGIN_OPTIONAL, 
        "AdditionalInfo=sapgui5022", 
    END_OPTIONAL);
// Output is "Checkbox is set"
if (sapgui_is_checkbox_selected("Confirm Checkbox State", "usr/chkWBTABLE-MOVIE", LAST))
        lr_output_message("Checkbox is set");
    else
        lr_output_message("Checkbox is not set");