Find
Last updated
Last updated
This is pre-built action located under the @Generic Element Name; this action instructs the Avo Assure Client check the presence of specific string within a longer set of strings.The process identifies the position of a target string within a predefined string and store the result as two different output variable.
Input: <actual string>; <string to find>; <wildcard>(optional)
1. 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.
2. Wildcard: this is declaration where user will declare which wildcard character is using for current execution.
a. In Avo Assure ‘?’ And ‘*’ are supported as wildcard character
Note: ? is for finding single character and * is used for finding multiple or zero characters
Output: <Dynamic Variable>;<Dynamic Variable>(Optional)
First Dynamic Variable saves the True/False status which tells whether the string to be found is present within the actual string or not.
Second Dynamic Variable tells the position at which the string to be found is present within the actual string
Imagine a social media application where a user 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.