String Operations
Keyword: TOLOWERCASE
Description: This keyword or action instructs ICE to convert input string to lower case and save the results in the given output variable.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains the value “hello”.
Keyword: TOUPPERCASE
Description: This keyword or action instructs ICE to convert input string to upper case and save the results in the given output variable.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains the value “HELLO”.
Keyword: RIGHT
Description: This keyword or action instructs ICE to fetch the number of characters from the right side of the string based on the input index and save the results in the output variable.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains the value “ing”.
Keyword: LEFT
Description: This keyword or action instructs ICE to fetch the number of characters from left side of the string based on the input index and save the results in the output variable.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains the value “test”.
Keyword: MID
Description: This keyword or action instructs ICE to fetch the middle part of the string and save the results in the output variable.
Note : If the input string has even number of characters then it returns the mid+1 value.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains the value “t”.
Keyword: CONCATENATE
Description: This keyword or action instructs ICE to concatenate the given strings and save the results in the output variable.
Find the snippet of the keyword below:
In the above example after the test case debug, {concatResult} variable contains the value “1245PM”.
Keyword: FIND
Description: This keyword or action instructs ICE to check whether the given string is present in the actual string and save the results “True” or “False” in the first output variable, the second output variable saves the index of where the find string was found within the actual string.
Note:
This keyword supports Wildcard characters for performing find
operations. Wildcard characters allowed: ? – For single character, * - For zero/multiple character.
If search has to be done using wildcard characters then the third input has to be “wildcard” (case insensitive).
If the wildcard option is specified, then the characters '?' or '*' should be present in the second input.
If the wildcard option is not specified, then it will perform normal find operation and will not search the find string using for wildcard characters.
Find the snippet of the keyword below, without wildcard options:
In the above example after the test case debug, {result} variable contains the value “True”, and {index} variable contains the value “5”.
Find the snippet of the keyword below, with wildcard options:
In the above example after the test case debug, {res} variable contains the value “True”, and {index} variable contains the value “[1,6]”.
Note: While the wildcard option is applied and the result obtained is just one positional value then it will not be a list containing the position, instead it will just be the position itself.
Keyword: REPLACE
Description: This keyword or action instructs ICE to replace the part of the actual string with the given string and save the results in the output variable.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains the value “Hardware Testing”.
Keyword: GETSTRINGLENGTH
Description: This keyword or action instructs ICE to fetch the length of the given string and save the results in the output variable.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains the value “12”.
Keyword: GETSUBSTRING
Description: This keyword or action instructs ICE to fetch the part of the string based on index or range and save the results in the output variable.
Note: Input index starts from '1'.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains the value “al re”.
Keyword: SPLIT
Description: This keyword or action instructs ICE to split/divide the given string based on the split character and save the results in the output variable.
Note: The split value will be stored in the {Variable} in the format of array as specified below. Array index starts from 0. To access individual values in the variable, user should use below format: {Variable[0]} , {Variable[1]} , {Variable[2]}
Find the snippet of the keyword below:
In the above example after the test case debug, {result[0]} variable contains the value “Locations” and {result[1]} variable contains the value “ATMs”.
Keyword: TRIM
Description: This keyword or action instructs ICE to trim the trailing and leading spaces in the input and save the results in the output variable.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains the value “Locations & ATMs” without leading or trailing spaces.
Keyword: STRINGGENERATION
Description: This keyword or action instructs ICE to generate a random string of a given length and save the results in the output variable.
Note: “type” supported are: 1. Character (‘Char’) and 2. Numerical (‘Num’).
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains 8 character randomly generated string (e.g.: dhCuPXCs).
Keyword: TYPECAST
Description: This keyword or action instructs ICE to change one format of the variable to another and save the results in the output variable.
Note: Supported formats are:
Integer, Float and Double, String and date.
Input Date Formats: dd/MM/yyyy, dd/MMM/yyyy, MM/dd/yyyy, MMM/dd/yyyy
Following input format conversions are not supported:
"String" To "Int", "Double", "Float". "Date" To "Int", "Double", "Float".
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains “25”.
Keyword: VERIFYVALUES
Description: This keyword or action instructs ICE to compare the two values present in the input column value and save the results (“True/False”) in the output variable.
Find the snippet of the keyword below:
In the above example after the test case debug, {result} variable contains “False”.
Last updated