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 | |||
| SAP | sapSelectDropDownByText |
Sheet:Column | |||
| SAP | sapSelectDropDownByText |
%dynamicVar% |
@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 | |||
| SAP | sapSelectDropDownByKey |
Sheet:Column | |||
| SAP | sapSelectDropDownByKey |
%dynamicVar% |
@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 | |||
| SAP | sapSelectDropDownByIndex |
Sheet:Column | |||
| SAP | sapSelectDropDownByIndex |
%dynamicVar% |
@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 | |||
| SAP | sapSelectCheckBox |
Sheet:Column | |||
| SAP | sapSelectCheckBox |
%dynamicVar% |
@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 | |||
| SAP | sapSelectRadioButtonInRow |
Sheet:Column | |||
| SAP | sapSelectRadioButtonInRow |
%dynamicVar% |
@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 | |||
| SAP | sapSelectTableRow |
Sheet:Column | |||
| SAP | sapSelectTableRow |
%dynamicVar% |
@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 |
@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 |
@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 | |||
| SAP | sapSelectGridRow |
Sheet:Column | |||
| SAP | sapSelectGridRow |
%dynamicVar% |
@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 | |||
| SAP | sapSelectContextMenuItem |
Sheet:Column | |||
| SAP | sapSelectContextMenuItem |
%dynamicVar% |
@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);
}
}