Skip to content

ComboBox/Dropdown Select Actions

sapSelectDropDownByText

Since: 3.0

Description: Select dropdown value by visible text.

Input Format: Visible text value

ObjectName Action Input Condition Reference
SAP 🟢 sapSelectDropDownByText @value ⬅ Hardcoded Input
SAP 🟢 sapSelectDropDownByText Sheet:Column ⬅ Input from Datasheet
SAP 🟢 sapSelectDropDownByText %dynamicVar% ⬅ Input from variable
@Action(object = ObjectType.SAP, desc = "Select dropdown value by visible text [<Data>]", input = InputType.YES)
public void sapSelectDropDownByText() {
    try {
        Dispatch.put(SAPcomboBox, "Text", Data);
        Report.updateTestLog(Action, "Dropdown value set to [" + Data + "]", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to set dropdown value. Error: " + e.getMessage(), Status.FAILNS);
    }
}

sapSelectDropDownByKey

Since: 3.0

Description: Select dropdown value by key (internal value).

Input Format: Key value

ObjectName Action Input Condition Reference
SAP 🟢 sapSelectDropDownByKey @value ⬅ Hardcoded Input
SAP 🟢 sapSelectDropDownByKey Sheet:Column ⬅ Input from Datasheet
SAP 🟢 sapSelectDropDownByKey %dynamicVar% ⬅ Input from variable
@Action(object = ObjectType.SAP, desc = "Select Dropdown value by Key [<Data>]", input = InputType.YES)
public void sapSelectDropDownByKey() {
    try {
        Dispatch.put(SAPcomboBox, "Key", Data);
        Report.updateTestLog(Action, "Dropdown key set to [" + Data + "]", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to set dropdown key. Error: " + e.getMessage(), Status.FAILNS);
    }
}

sapSelectDropDownByIndex

Since: 3.0

Description: Select dropdown value by index.

Input Format: Index (integer)

ObjectName Action Input Condition Reference
SAP 🟢 sapSelectDropDownByIndex @value ⬅ Hardcoded Input
SAP 🟢 sapSelectDropDownByIndex Sheet:Column ⬅ Input from Datasheet
SAP 🟢 sapSelectDropDownByIndex %dynamicVar% ⬅ Input from variable
@Action(object = ObjectType.SAP, desc = "Select dropdown value by index [<Data>]", input = InputType.YES)
public void sapSelectDropDownByIndex() {
    try {
        Dispatch.call(SAPcomboBox, "Item", Integer.parseInt(Data));
        Report.updateTestLog(Action, "Dropdown index set to [" + Data + "]", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to set dropdown index. Error: " + e.getMessage(), Status.FAILNS);
    }
}

sapSelectCheckBox

Since: 3.0

Description: Select or deselect a checkbox.

Input Format: true/false

ObjectName Action Input Condition Reference
SAP 🟢 sapSelectCheckBox @value ⬅ Hardcoded Input
SAP 🟢 sapSelectCheckBox Sheet:Column ⬅ Input from Datasheet
SAP 🟢 sapSelectCheckBox %dynamicVar% ⬅ Input from variable
@Action(object = ObjectType.SAP, desc = "Set checkbox [<Object>] to [<Data>] (true/false)", input = InputType.YES)
public void sapSelectCheckBox() {
    try {
        Dispatch.put(SAPelement, "Selected", Boolean.parseBoolean(Data));
        Report.updateTestLog(Action, "Checkbox set to [" + Data + "]", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to set checkbox. Error: " + e.getMessage(), Status.FAILNS);
    }
}

sapSelectRadioButtonInRow

Since: 3.0

Description: Select radio button in table row.

Input Format: Row number

ObjectName Action Input Condition Reference
SAP 🟢 sapSelectRadioButtonInRow @value ⬅ Hardcoded Input
SAP 🟢 sapSelectRadioButtonInRow Sheet:Column ⬅ Input from Datasheet
SAP 🟢 sapSelectRadioButtonInRow %dynamicVar% ⬅ Input from variable
@Action(object = ObjectType.SAP, desc = "Select Radio Button in row [<Data>]", input = InputType.YES)
public void sapSelectRadioButtonInRow() {
    try {
        Dispatch.put(SAPtable.getAbsoluteRow(Integer.parseInt(Data)), "Selected", true);
        Report.updateTestLog(Action, "Radio button selected in row [" + Data + "]", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to select radio button. Error: " + e.getMessage(), Status.FAILNS);
    }
}

sapSelectTableRow

Since: 3.0

Description: Select table row.

Input Format: Row number

ObjectName Action Input Condition Reference
SAP 🟢 sapSelectTableRow @value ⬅ Hardcoded Input
SAP 🟢 sapSelectTableRow Sheet:Column ⬅ Input from Datasheet
SAP 🟢 sapSelectTableRow %dynamicVar% ⬅ Input from variable
@Action(object = ObjectType.SAP, desc = "Select table row [<Data>]", input = InputType.YES)
public void sapSelectTableRow() {
    try {
        Dispatch.call(SAPtable, "SelectRow", Integer.parseInt(Data));
        Report.updateTestLog(Action, "Table row [" + Data + "] selected", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to select table row. Error: " + e.getMessage(), Status.FAILNS);
    }
}

sapSelect

Since: 3.0

Description: Select a tab.

Input Format: None

ObjectName Action Input Condition Reference
SAP 🟢 sapSelect ⬅ No Input
@Action(object = ObjectType.SAP, desc = "Select the [<Object>]")
public void sapSelect() {
    try {
        Dispatch.call(SAPtab, "select");
        Report.updateTestLog(Action, "Tab selected", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to select tab. Error: " + e.getMessage(), Status.FAILNS);
    }
}

sapSelectMenuItem

Since: 3.0

Description: Select menu item.

Input Format: None

ObjectName Action Input Condition Reference
SAP 🟢 sapSelectMenuItem ⬅ No Input
@Action(object = ObjectType.SAP, desc = "Select menu item [<Object>]", input = InputType.NO)
public void sapSelectMenuItem() {
    try {
        Dispatch.call(SAPmenu, "Select");
        Report.updateTestLog(Action, "Menu item selected", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to select menu item. Error: " + e.getMessage(), Status.FAILNS);
    }
}

sapSelectGridRow

Since: 3.0

Description: Select ALV grid row.

Input Format: Row number

ObjectName Action Input Condition Reference
SAP 🟢 sapSelectGridRow @value ⬅ Hardcoded Input
SAP 🟢 sapSelectGridRow Sheet:Column ⬅ Input from Datasheet
SAP 🟢 sapSelectGridRow %dynamicVar% ⬅ Input from variable
@Action(object = ObjectType.SAP, desc = "Select ALV grid row [<Data>]", input = InputType.YES)
public void sapSelectGridRow() {
    try {
        Dispatch.call(SAPgrid, "SelectRow", Integer.parseInt(Data));
        Report.updateTestLog(Action, "Grid row [" + Data + "] selected", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to select grid row. Error: " + e.getMessage(), Status.FAILNS);
    }
}

sapSelectContextMenuItem

Since: 3.0

Description: Select context menu item.

Input Format: Menu ID

ObjectName Action Input Condition Reference
SAP 🟢 sapSelectContextMenuItem @value ⬅ Hardcoded Input
SAP 🟢 sapSelectContextMenuItem Sheet:Column ⬅ Input from Datasheet
SAP 🟢 sapSelectContextMenuItem %dynamicVar% ⬅ Input from variable
@Action(object = ObjectType.SAP, desc = "Select context menu item [<Data>]", input = InputType.YES)
public void sapSelectContextMenuItem() {
    try {
        Dispatch.call(SAPelement, "selectContextMenuItem", Data);
        Report.updateTestLog(Action, "Selected context menu item [" + Data + "]", Status.DONE);
    } catch (Exception e) {
        Report.updateTestLog(Action, "Failed to select context menu item. Error: " + e.getMessage(), Status.FAILNS);
    }
}