Custom Operations
The keywords in this section are designed to handle user-defined or project-specific actions that are not covered by standard operations. These enable flexibility by allowing customization for unique testing needs, ensuring tailored solutions for complex scenarios.
The @custom actions perform the same function as regular actions.
Input
<object type>; <Visible Text (Optional)> ; <Index>
Note: VerifyExists must be performed on the parent container element before using @Custom Actions.
Following are the actions supported in @Custom for the respective object types mentioned:
Click : [‘radiobutton’,’checkbox’,’input',’button’ ,’select’, ‘table’, ’label’],\
DoubleClick : [‘radiobutton’,’checkbox’, ‘input',’button’ ,’select’, ‘table’, ’label’],
GetElementText : [‘radiobutton’,’checkbox’,’input',’button’ ,’select’, ‘table’, ’label’],
GetStatus : [‘radiobutton’,’checkbox’]
GetText : [‘input’],
SelectCheckbox : [‘checkbox’],
SelectRadioButton : [‘radiobutton’],
SetSecureText : [‘input’],
SelectValueByText : [‘select’],
SelectValueByIndex:[‘select'],
SetText : [‘input’],
UnselectCheckbox : [‘checkbox’],
VerifyElementText : [‘radiobutton’,’checkbox’,’input',’button’ ,’select’, ‘table’, ’label’],
VerifyExists: [‘radiobutton’,’checkbox’,’input',’button’ ,’select’, ‘table’, ’label’]
Working of @Custom
Unlike the desktop plugin, we cannot perform verifyExists on any element and expect @custom to work. We should perform verifyExists only on the container element containing the child elements (Note: it need not be the immediate container element). In the below example, the parent container element is usr.
Note: In the example of ABAP Dictionary: Initial Screen, we cannot perform @Custom after we perform verifyExists on the radio button: Database table, as this radio button does not have any child elements to perform the @Custom operation.
We can verify this by viewing the structure of this SAP window in the Tracker tool as shown:
We can see that only the container named usr has child elements. No other element has any children. This format follows for all SAP windows.
We can take another example of this (in Dictionary: Display Table in SE11):
Here, the multiple parent container elements exist. Since we do not need an immediate parent container element, we can perform verifyExists on usr and expect @Custom to work on the elements inside the table: tblSAPLSD41TC0. Vice versa is impossible as the table: tblSAPLSD41TC0 is not the parent container of usr.
We can verify this in the Tracker tool:
We can see that the usr container is the parent of the tabsTAB_STRIP container, which is the parent of the tabpDEF container, and so on.
Last updated