Custom Operations
The @custom keywords perform the same function as regular keywords.
Input : <object type>; <Visible Text (Optional)> ; <Index>
Note: VerifyExists must be performed on the parent container element before using @Custom Keywords.
Following are the keywords 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 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 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 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 not possible as the table: tblSAPLSD41TC0 is not the parent container of usr.
We can verify this in Tracker tool:
We can see that the usr container is the parent of tabsTAB_STRIP container, which is the parent of tabpDEF container and so on.
Keyword: CLICK
Description: This keyword or action instructs ICE to click on the object as specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
Click
<Object Type>; <Visible Text (optional)>; <Index>; <Row (Table-optional)>; <Column (Table-optional)>
(Optional)
Text
Static Values
Dynamic Variables
Note: The index starts from “1” for Custom Keywords in SAP and “verifyExists” step should precede “@Custom’ test steps.
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will click on the first RadioButton of that page and if output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: DOUBLECLICK
Description: This keyword or action instructs ICE to double click on the object as specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
DoubleClick
<Object Type>; <Visible Text (optional)>; <Index>; <Row (Table-optional)>; <Column (Table-optional)>
(Optional)
Text
Static Values
Dynamic Variables
Note: The index starts from “1” for Custom Keywords in SAP and “verifyExists” step should precede “@Custom’ test steps.
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will double click on the first RadioButton of that page and if output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: GETELEMENTTEXT
Description: This keyword or action instructs ICE to fetch the text of the element/object as specified in the input and save the result in the output variable.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
GetElementText
<Object Type>; <Visible Text (optional)>; <Index>; <Row>; <Column (Table-optional)>
{Variable}:{Status}
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will fetch the text of the second element of that page and the value will be stored in variable {GET}. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: GETSTATUS
Description: This keyword or action instructs ICE to fetch the status of the object as specified in the input and save the result in the output variable.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
GetStatus
<Object Type>; <Visible Text (optional)>; <Index>
{Variable}; {Status}
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will fetch the status of the second RadioButton of that page and the value will be stored in variable {GS2}. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: GETTEXT
Description: This keyword or action instructs ICE to fetch the text of the object as specified in the input and save the result in the output variable.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
GetText
<Object Type>; <Visible Text (optional)>; <Index>
{Variable}:{Status}
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will fetch the text of the first textbox of that page and the value will be stored in variable {GS}. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: SELECTCHECKBOX
Description: This keyword or action instructs ICE to select the checkbox as specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
SelectCheckbox
<Object Type>; <Visible Text (optional)>; <Index>
(Optional)
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will select the first checkbox of that page. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: SELECTRADIOBUTTON
Description: This keyword or action instructs ICE to select the radio button as specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
SelectRadioButton
<Object Type>; <Visible Text (optional)>; <Index>
(Optional)
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will select the second RadioButton of that page. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: SELECTVALUEBYTEXT
Description: This keyword or action instructs ICE to select the value from the dropdown according to the text for the list specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
SelectValueByText
<Object Type>; <Visible Text (optional)>; <Index>; <Input Text>
(Optional)
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will select the value “Persons” in the first dropdown of that page. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: SELECTVALUEBYINDEX
Description: This keyword or action instructs ICE to select the value from the dropdown according to the index for the list specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
SelectValueByIndex
<Object Type>; <Visible Text (optional)>; <Index>; <Input index>
(Optional)
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will select the value with index 0 in the first dropdown of that page. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: SETSECURETEXT
Description: This keyword or action instructs ICE to set the encrypted text to the text field as specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
SetSecureText
<Object Type>; <Visible Text (optional)>; <Index>; <Encrypted Text>
(Optional)
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will enter the encrypted text to the twentieth textbox of that page. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: SETTEXT
Description: This keyword or action instructs ICE to select the value from the dropdown according to the text for the list specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
SetText
<Object Type>; <Visible Text (optional)>; <Index>; <Input Text>
(Optional)
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will enter the value “Program” into the first textbox of that page. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: UNSELECTCHECKBOX
Description: This keyword or action instructs ICE to unselect the checkbox as specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
UnSelectCheckbox
<Object Type>; <Visible Text (optional)>; <Index>
(Optional)
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will unselect the second checkbox of that page. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: VERIFYELEMENTTEXT
Description: This keyword or action instructs ICE to verify if the element text on the object is the same as specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
verifyElementText
<Object Type>; <Visible Text (optional)>; <Index>; <Input Text>
(Optional)
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will verify if the second element in that page has text as “Text”. If output variable is provided for execution status, “True”/ “False” will be stored in it.
Keyword: VERIFYEXISTS
Description: This keyword or action instructs ICE to verify the existence of the object as specified in the input.
Keyword
Input Syntax
Output Syntax
Supported Input Formats
verifyExists
<Object Type>; <Visible Text (optional)>; <Index>; <Input Text>
(Optional)
Text
Static Values
Dynamic Variables
Find the snippet of the keyword below:
In the above example, after the test case debug, ICE will verify the existence of the second dropdown of that page. If it exists “True” will be stored, else “False” will be stored in the output variable.
Last updated