String Operations
Last updated
Last updated
Description: This keyword or action instructs Avo Assure Client to convert the input string to lowercase and save the results in the given output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
toLowerCase | <string> | {Variable} |
|
Find the snippet of the keyword below:
In the above example, after the test case debug, {result} variable contains the value “hello”.
Description: This keyword or action instructs Avo Assure Client to convert the input string to upper case and save the results in the given output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
toUpperCase | <string> | {Variable} |
|
Find the snippet of the keyword below:
In the above example, after the test case debug, {result} variable contains the value “HELLO”.
Description: This keyword or action instructs Avo Assure Client 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.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
right | <string>; <position to fetch the string from right> | {Variable} |
|
Find the snippet of the keyword below:
In the above example, after the test case debug, {result} variable contains the value “ing”.
Description: This keyword or action instructs Avo Assure Client 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.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
left | <string>; <position to fetch the string from right> | {Variable} |
|
Find the snippet of the keyword below:
In the above example, after the test case debug, {result} variable contains the value “test”.
Description: This keyword or action instructs Avo Assure Client to fetch the middle part of the string and save the results in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
mid | <string> | {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”.
Description: This keyword or action instructs Avo Assure Client to concatenate the given strings and save the results in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
concatenate | <string1>; <string2> | {Variable} |
|
Find the snippet of the keyword below:
In the above example after the test case debug, {concatResult} variable contains the value “1245PM”.
Description: This keyword or action instructs Avo Assure Client 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:
1.This keyword supports Wildcard characters for performing findoperations. Wildcard characters allowed: ? – For single character, * - For zero/multiple character.
2.If search has to be done using wildcard characters then the third input has to be “wildcard” (case insensitive).
3.If the wildcard option is specified, then the characters '?' or '*' should be present in the second input.
4.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.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
find | <actual string>; <string to find>; <wildcard>(optional) | {Variable 1}; {Variable 2} |
|
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.
Description: This keyword or action instructs Avo Assure Client to replace the part of the actual string with the given string and save the results in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
replace | <actual string>; <string to be replaced>; <string to replace> | {Variable} |
|
Find the snippet of the keyword below:
In the above example, after the test case debug, {result} variable contains the value “Hardware Testing”.
Description: This keyword or action instructs Avo Assure Client to fetch the length of the given string and save the results in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
getStringLength | <string> | {Variable} |
|
Find the snippet of the keyword below:
In the above example, after the test case debug, {result} variable contains the value “12”.
Description: This keyword or action instructs Avo Assure Client to fetch the part of the string based on index or range and save the results in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
getSubString | <string>; <index OR range> | {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”.
Description: This keyword or action instructs Avo Assure Client to split/divide the given string based on the split character and save the results in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
split | <string>; <split by character> | {Variable} |
|
Note: The split value will be stored in the {Variable} in the format of the array as specified below. Array index starts from 0.
To access individual values in the variable, the user should use the following:
{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”.
Description: This keyword or action instructs Avo Assure Client to trim the trailing and leading spaces in the input and save the results in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
trim | <string> | {Variable} |
|
Find the snippet of the keyword below:
In the above example, after the test case debug, {result} variable contains the value “Locations & AT" "s” without leading or trailing spaces.
Description: This keyword or action instructs Avo Assure Client to generate a random string of a given length and save the results in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
stringGeneration | <type>; <length> | {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 characters randomly generated string (e.g., dhCuPXCs).
Description: This keyword or action instructs Avo Assure Cli"ntar"ay format to change one variable format to another and save the results in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
typeCast | <Value>; <typecast type>Date Conversion:<Value>; date; <Required Date format> | {Variable} |
|
Note: Supp'rted'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", and "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”.
Description: This keyword or action instructs Avo Assure Client to compare the two values present in the input column value and save the results (“True/False”) in the output variable.
Keyword | Input Syntax | Output Syntax | Supported Input Formats |
verifyValues | <value1>; <value2> | {Variable} |
|
Find the snippet of the keyword below:
In the above example, after the test case debug {"result"} variable contains "False".