String Operations

String Operations

Keyword: TOLOWERCASE

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.

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 Avo Assure Client to convert the 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 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.

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 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.

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 Avo Assure Client 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 Avo Assure Client 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 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. 1.This keyword supports Wildcard characters for performing findoperations. Wildcard characters allowed: ? – For single character, * - For zero/multiple character.

  2. 2.If search has to be done using wildcard characters then the third input has to be “wildcard” (case insensitive).

  3. 3.If the wildcard option is specified, then the characters '?' or '*' should be present in the second input.

  4. 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.

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 Avo Assure Client 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 Avo Assure Client 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 Avo Assure Client 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 Avo Assure Client 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 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”.

Keyword: TRIM

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.

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.

Keyword: STRINGGENERATION

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.

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).

Keyword: TYPECAST

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.

Note: Supp'rted'formats are:

  1. Integer, Float, and Double, String, and date. Input Date Formats: dd/MM/yyyy, dd/MMM/yyyy, MM/dd/yyyy, MMM/dd/yyyy

  2. 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”.

Keyword: VERIFYVALUES

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.

Find the snippet of the keyword below:

In the above example, after the test case debug {"result"} variable contains "False".

Last updated