sapgui_table_is_checkbox_selected

Table Functions

Checks if checkbox in a table is selected.

int sapgui_table_is_checkbox_selected( const char *description, const char *tableID, const char *row, const char *column, [args,] LAST );
description User entered text to aid in understanding script
tableIDObject ID Strings
row Row number. The first data row is numbered zero (0). If there is a header row it is numbered (-1).
column Column number. The first column is numbered zero (0).
argsOptional Arguments
LAST A marker indicating the end of the argument list. Not required if Optional Arguments are used.

The sapgui_table_is_checkbox_selected verification function applies to a checkbox in a table control. It returns whether the box 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_table_is_checkbox_selected to confirm success of the select action.

/*Click on "Visible/Hidden" check box to select it */
sapgui_table_set_checkbox("(0, 'Invisible')", 
    "usr/tblRSDEMO02TC_COLS", 
    "0", 
    "15", 
    "True", LAST );
/* Now check the status. Output is "Checked" */
if (sapgui_table_is_checkbox_selected("Is box Checked?", 
    "usr/tblRSDEMO02TC_COLS", // Table ID
    "0", // First row
    "15", // Sixteenth column
    LAST)
)
    lr_output_message("Checked");
else
    lr_output_message("Not Checked");
/*Click again on check box to clear it */
sapgui_table_set_checkbox("(0, 'Invisible')", 
    "usr/tblRSDEMO02TC_COLS", 
    "0", 
    "15", 
    "False", LAST );
/* Now check the status. Output is "Not Checked" */
if (sapgui_table_is_checkbox_selected("Is box Checked?", 
    "usr/tblRSDEMO02TC_COLS", 
    "0", 
    "15", 
    LAST)
    )
        lr_output_message("Checked");
    else
        lr_output_message("Not Checked");