Assert that text matches exactly in your automated test
When precision matters, Check Text Equals allows you to confirm that an element’s text content matches an expected value exactly. This is different from checking whether text simply contains a phrase. It validates the full string, ensuring there are no unexpected differences.
This is essential when you need strict correctness rather than partial matching.
Why exact text matching matters
There are many situations where partial matches are not enough:
Confirming a price is exactly correct
Validating order totals or tax calculations
Checking button labels or CTAs
Verifying status messages such as “Order Complete”
Ensuring translated text matches expected copy
Confirming dynamic values are rendered correctly
Exact matching ensures that formatting, spelling, spacing, and values are precisely what you expect.
How it works
The step targets a specific element and compares its rendered text against the value you provide.
The test will:
Pass if the text matches exactly
Fail if the text differs in any way
Fail if the element does not exist
This gives you strong validation at critical checkpoints in your flow.
Common use cases
Exact text assertions are often used when:
Validating confirmation messages after a form submission
Checking cart totals before checkout
Confirming environment banners such as “Staging” or “Production”
Verifying account names or user details
Ensuring regulatory or legal copy displays correctly
Because this check is strict, it is ideal for high-confidence assertions where small differences matter.
Combine with dynamic values
You can combine this step with DoesQA’s Value Store and dynamic values to assert on:
Dates formatted in a specific way
Calculated totals
Randomised data generated earlier in the flow
Environment specific values
This allows your tests to remain flexible while still validating exact output.
Cleaner, more predictable tests
Using Check Text Equals improves test clarity. Anyone reviewing your flow can immediately see that the output must match a defined value exactly.
This reduces ambiguity, improves reliability, and ensures your automated tests reflect real business expectations, not loose approximations.