Logical and Looping Operations
Keyword: IF
Description: This keyword or action instructs ICE to check if the condition is true or false.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
If | (<operand1>;<operator>; <operand2>) | NA |
|
Note:
“if” keyword should be mandatorily succeeded by “endIf” keyword and can contain multiple elseIf’s and else in that order.
Expression should be closed within parenthesis () and at least 2 operands and 1 operator should be present.
To compare empty string or whitespaces, it has to be passed through dynamic variable.
Special characters should be passed through dynamic variables.
No “(&)” i.e. parenthesis are allowed in naming dynamic variable.
Operands AND, OP, NOT must be capitalized.
User can use “if” and “endIf” in different testcase within the same scenario.
The snippet of the keyword is mentioned in “else” keyword.
Keyword: ELSE
Description: This keyword or action instructs ICE to execute the set of statements that are between the keyword “else” and “endIf”.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
Else | NA | NA | NA |
Note: “else” keyword should be mandatorily preceded by “if” keyword and succeeded by “endIf” keyword.
Find the snippet of the keyword below:
In the above example, after the test case debug, it checks the condition and if it is false, then it executes the set of statements that are between keywords “else” and “endIf”.
Keyword: ELSEIF
Description: This keyword or action instructs ICE to check if the condition is true or false, after an original condition is verified and failed by “if” keyword.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
elseIf | (<operand1>; <operator>; <operand2>) | NA |
|
Note: “elseIf” keyword should be mandatorily preceded by “if” keyword and succeeded by another “elseIf” or “else” or “endIf” keyword.
Find the snippet of the keyword below:
In the above example, after the test case debug, it checks if the condition is true/false, after an original condition is verified and failed by “if” keyword.
Keyword: ENDIF
Description: This keyword or action instructs ICE to execute the steps within the “if” and “endIf” keywords.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
endIf | NA | NA | NA |
Note: “endIf” keyword should be mandatorily preceded by “if”/”if-elseIf”/”if-else” keyword combinations.
The snippet of the keyword is mentioned in “elseIf” keyword.
Keyword: FOR
Description: This keyword or action instructs ICE to execute the steps within the “for” and “endFor” keywords for the specified number of times or count.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
for | <number> | NA |
|
Note: “for” keyword should be mandatorily succeeded by “endFor” keyword (after the steps).
Find the snippet of the keyword below:
In the above example, after the test case debug, it executes the steps with the “for” and “endFor” for 2 times.
Keyword: ENDFOR
Description: This keyword or action instructs ICE to execute the steps within the “for” and “endFor” keywords for the specified number of times or count.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
endFor | NA | NA | NA |
Note: “endIf” keyword should be mandatorily preceded by “for” keyword.
The snippet of the keyword is mentioned in “for” keyword.
Keyword: GETPARAM
Description: This keyword or action instructs ICE to execute the steps within the “StartLoop” and “EndLoop” of getParam.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
getParam | <file path>; <sheetname in case of excel> (Mandatory) <row count> OR <start row- end row> as third input | NA |
|
Note:
The user is advised to specify the number of rows in a range to be executed in the getParam, else the iterations may run for the maximum number of rows in that worksheet irrespective of the reference column.
The user can give range as follows: D:\sample.xlsx;Sheet;2-4 (The first row of the excel sheet is considered as a header.)
If the user wants to execute a single row, then input is given as below: D:\sample.xlsx;Sheet1;3
Input format for .csv file, for example: D:\sample.csv
Input format for .xml file, for example: D:\sample.XML
Input format for Avo Assure data table, for example: avoassure/DataTableName
If there are any duplicate column names in the non-reference columns, the user will get the duplicate columns exist error message and getParam will not work.
Find the snippet of the keyword below, while using an XML file for data parameterization:
In the above example, after the test case debug, it takes the input from the specified XML file and executes the setTagValue keyword (with the input containing the value of the key/tag named “ZIP” in the XML file) within the “StartLoop” and “EndLoop” of “getParam”.
Find the snippet of the keyword below, while using an excel file for data parameterization:
In the above example, after the test case debug, it takes the input from the “Sheet1” of “sample” excel and executes the find keyword within the “StartLoop” and “EndLoop” of getParam”.
Find the snippet of the keyword below, while using an Assure data table for data parameterization:
In the above example, after the test case debug, it takes the input from the SampleDataTable and executes the displayVariableValue keyword within the “StartLoop” and “EndLoop” of getParam”.
Keyword: STARTLOOP
Description: This keyword or action instructs ICE to the start of “getParam” keyword.
Keyword | INput Syntax | Output Syntax | Supported Input Formats |
startLoop | NA | NA | NA |
Note: “startLoop” keyword should be mandatorily preceded by “getParam” and succeeded by “endLoop” keywords.
The snippet of the keyword is mentioned in “getParam” keyword.
Keyword: ENDLOOP
Description: This keyword or action instructs ICE to the end of “getParam” keyword.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
endLoop | NA | NA | NA |
Note: “endLoop” keyword should be mandatorily preceded by “getParam” and “startLoop” keywords.
The snippet of the keyword is mentioned in “getParam” keyword.
Last updated