Share this page

# sapgui_is_radio_button_selected

Verification and Data Retrieval Functions

Checks if a radio button is selected.

    int sapgui_is_radio_button_selected( const char *description, const char *buttonID,[args,] LAST );

description | User entered text to aid in understanding script
buttonID | Object ID Strings
args | Optional Arguments
LAST | A marker indicating the end of the argument list. Not required if Optional Arguments are used.

The sapgui_is_radio_button_selected verification function returns whether the radio button is selected or 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_radio_button_selected to confirm the successful selection of a radio button, then confirm change of the selection.

Copy code

    /* Select the "Blue" radio button from a group of colors */
    sapgui_set_focus("usr/radRB7", LAST );
    // Click the button
    sapgui_select_radio_button("Blue",
        "usr/radRB7",
        BEGIN_OPTIONAL,
            "AdditionalInfo=sapgui1027",
        END_OPTIONAL);
    // Confirm the button state. Output is "Button is set"
    if (sapgui_is_radio_button_selected("Confirm State of Blue button", "usr/radRB7", LAST))
            lr_output_message("Button is set");
        else
            lr_output_message("Button is not set");
    // Change from Blue to Yellow
    sapgui_set_focus("usr/radRB4",LAST );
    sapgui_select_radio_button("Yellow", "usr/radRB4", LAST );
    // Confirm the Blue button state. Output is "Button is not set"
    if (sapgui_is_radio_button_selected("Confirm State of Blue button",
            "usr/radRB7", // Id of Blue button
             LAST))
            lr_output_message("Button is set");
        else
            lr_output_message("Button is not set");
    // Confirm the Yellow button state. Output is "Button is set"
    if (sapgui_is_radio_button_selected("Confirm State of Yellow button",
            "usr/radRB4", // ID of Yellow Button
            LAST))
            lr_output_message("Button is set");
        else
            lr_output_message("Button is not set");

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: