Add a Verification Step
The AI Recorder allows you to add verification steps to confirm expected behavior in your application. The available verification types are:
- Verify text is found on the page
- Verify a text in relation to other text
- Verify text is not found on the page
- Verify element property (such as href or img)
Select the Type of Verification
To add a verification step:
Navigate to the page where you want to add the verification step during recording.
In recording mode, select the Add a verification step icon, then choose the type of verification you want to add.
Verify Text Is Found in the Page
Use this verification to check if the specified text appears on the screen.
Example use cases:
- Verify a welcome message is displayed after login.
- Verify you are on a specific page. Example: "Shipping Details"
- Verify a maintenance notification is displayed at the top of the page.
- Verify a confirmation message is shown after placing an order.
Steps:
Select Verify text is found on the page. A text selection box appears.
Select the text element in the browser or enter it in the field.
While entering the text,note that it is case-sensitive by default.
Additionally, you can add checks in the advanced settings provided:
Make it a regular expression – Adds
/
at both ends.Make case insensitive – Ignores letter case.
Ignore digits – Ignores numerical values.
Look for exact match – Ensures the text matches exactly.
Select Save to add the verification step.
Verify Text in Relation to Other
Use this verification to check if one text appears in relation to another.
Example use cases:
- On the products page, verify that product X has a Price of $30
- On the booking confirmation page, verify that Flight 123 is departing from JFK at 10:00 AM.
- On the hotel listing page, verify that Hotel A has a rating of 4.5 stars
- On the event page, verify that Event X is scheduled for September 19th, 2024
Steps:
Select Verify a text in relation to another text. A text selection box appears.
Select the reference text first, then the text to verify. Both texts appear in the selection box.
Additionally, you can add checks in the advanced settings provided:
- Make it a regular expression – Adds
/
at both ends. - Make case insensitive – Ignores letter case.
- Ignore digits – Ignores numerical values.
- Look for exact match – Ensures the text matches exactly.
- Make it a regular expression – Adds
Click Save to add the verification step.
Verify Text Is Not Found on the Page
Use this verification to confirm that a specific text does not appear on the screen.
Example use cases:
- Confirm that a warning notification is not shown when an action is completed successfully
- Check that a deleted user account no longer appears in the user list.
- Verify that an outdated promotional message is no longer displayed after an update
Steps:
Select Verify text is not found on the page.
Type the text that should not be present. Note that it is case-sensitive by default.
Additionally, you can add checks in the advanced settings provided:
Make it a regular expression – Adds
/
at both ends.Make case insensitive – Ignores letter case.
Ignore digits – Ignores numerical values.
Look for exact match – Ensures the text matches exactly.
Click Save to add the verification step.
Verify Element Property
Use this verification to check properties such as hyperlinks (href) or image sources (img).
Example use cases:
- Verify that a button links to the correct URL (href).
- Ensure that an image loads correctly by checking its src attribute.
Steps:
Select Verify element property.
Select the element in the browser.
Choose the property to verify (such as href or img).
Confirm the value of the selected property.
NOTE
You can make the value as a regular expression by adding
/
at both ends.Select Save to add the verification step.
Parameterize the Verification Step Text
By default, text assertion steps use a static string. You can replace this string with an existing or new parameter to make your tests more dynamic.
To parameterize the verification text:
Expand the Recorder to view existing parameters.
Add a new parameter and assign a value (or skip this if using an existing parameter).
Click the string in the verification step to reveal the text input field.
Clear the input, select the new parameter, and click the checkbox to save the changes.
NOTE
Don't forget to Generate Code and Save after finalizing all your steps.
TIP
Playback recorded steps using Run Scenario to verify them before publishing the recording.