Find

This pre-built action, found under @Generic Element, instructs Avo Assure to check whether the given string is present in the actual string and identify its position and the result is stored in a dynamic variable.

Syntax

Input Value: <actual string>;<string to find>;<wildcard>(optional)

Argument
Description

<actual string> (Required)

The input syntax contains the actual string and the expected string to be found, separated by a semicolon, both of which are written in the input column.

<string to find> (Required)

Which required string to find

<wildcard> (optional)

wildcard: this is declaration where user will declare which wildcard character is using for current execution In Avo Assure ‘?’ And ‘*’ are supported as wildcard character

Output Value:

Argument
Description

<Dynamic Variable >

(Required)

This Dynamic Variable save the results True or False.

<Dynamic Variable >

(Required)

This Dynamic Variable holds the index (position) of the string.

Example 1:

Find text without wildcard (I like this post amazing)

The Find action takes the value from the Input Value column (I like this post amazing) and searches for the exact string (amazing) without using a wildcard. The output of this status is stored in the {result} variable as True, and the position of the match is stored in the {position} variable as 18. with the following possible values:

  • True – if the exact string is found

  • False – if no match is found

  • None/Blank – if the input is missing

Example 2:

Find text using a wildcard (I like this post amazing)

The Find action takes the value from the Input Value column (I like this post amazing) and searches for the string (amazing*) using a wildcard, where * represents any characters after amazing. The output of this status is stored in the {result} variable as True, and the position of the match is stored in the {position} variable as 18 (index of the string).

Possible values for {Status}:

  • True – if the string (with wildcard pattern) is found

  • False – if no match is found

  • None/Blank – if the input is missing

Last updated

Was this helpful?