Verify Text In Relation To Other Text
Use Verify Text in Relation to Other Text to check if one text string appears near or in context with another. This is especially helpful when verifying key-value pairs or related information that should appear together on the same line, card, or section.
When To Use
Confirm key-value combinations like:
Email: user@example.com
Product X – $30
Departure — 8:45 AM
Ensure a label and its corresponding value are visually connected on the page
Validate contextually paired content in a table, grid, or summary section
Steps to Add 'Verify Text In Relation To Other Text'
While recording, click the Add a Verification Step icon.
Select Verify text in relation to other text.
Two input fields will appear:
Reference Text – The reference or label (e.g., "Product").
Related Text – The value that should appear near the anchor (e.g., "$30").
Optional
Configure the Advanced Settings to fine-tune the text matching behavior.
Click Save to add the verification step.
The verification step is added to the scenario and appears in the Recorder as a new step.
You can view this step in the Features page as part of the recorded scenario.
After running the scenario, you can view the result of this verification step on the Reports page.
Advanced Settings
Advanced settings helps you refine how the reference text and related text are identified on the page. These settings are available for both text fields in this verification type.
Note
To use the advanced options, first enable Make it a regular expression. You can then apply one or more of the built-in patterns, or write your own regex for more control.
Setting | What it does | Example |
---|---|---|
Make it a regular expression | Enables pattern matching using regex syntax. Adds / at both ends. | Searching for /Product.*X/ will match Product X, Product Name: X, or Product - X. |
Make case insensitive | Matches text regardless of letter casing. | product x will match Product X, PRODUCT X, or ProDuct x. |
Ignore digits | Ignores all numbers when matching the text. | Flight 123 will match Flight, or Flight 456, as the digits are ignored. |
Look for exact match | Requires the text to match exactly, with no extra characters or spaces. | Shipping Details must appear exactly as entered — it won’t match Shipping Details Page or Your Shipping Details. |