Find

This action instructs the Avo Assure Client check whether a specific string is present within a longer set of strings. It also tells the position of the string which is being found within an existing predefined string and store the result in two different output variables.

Syntax

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

Argument
Description

actual string

The input syntax contains the actual string within which an expected string is to be found which will be written in the input column along with the actual string and separated by a semicolon.

string to find

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: <Dynamic Variable>;<Dynamic Variable>(Optional)

Argument
Description

Dynamic Variable

First Dynamic Variable saves the True/False status which tells whether the string to be found is present within the actual string or not.

Dynamic Variable

Second Dynamic Variable tells the position at which the string to be found is present within the actual string

Usecase/Example

Scenario: User Comments Validation

Imagine a social media application where you can leave comments on posts. As part of your automated testing, you want to verify that a comment appears correctly on the post.

Actual String Example: When a user comments "I like this post! ️ #amazing", the application stores and displays the comment in a list.

Expected String with Wildcard: If you want to check that comments containing the word "like" are displayed, regardless of any additional text, you could use a wildcard in your test case.

Testing with Wildcard: Set your expected string as "like*", where the * acts as a wildcard character that allow to search multiple characters.

Expected Result

Expected strings need to be found in actual string.

Output

The resulting string is stored in the {result} and {position} output variable as True and 3,22 due to the expected string is found in actual string and on corresponding place, which can be utilized for display or other purposes.

Last updated

Was this helpful?