Reputation: 602
I have a response assertion validating the 'Document (text)' of a response.
This is the assertion
This is the response that the assertion is checking. As you can see I have directly copied 'Statutory Currency USD Total Tax (SC) 58.80' from the failing assertion and it is found in the response?!
Other assertions are passing for this request.
Upvotes: 1
Views: 331
Reputation: 34526
You’re using document instead of Text response in Fields to test.
Document is usually reserved to asserting on pdf, excel, word document. it has an important cost in terms of performance and is not needed when asserting on text (html, json...)
Also you should favor substring instead of contains.
Upvotes: 0
Reputation: 58772
Notice you can (maybe should) switch to using Substring
instead of Contains
which will fix your issue, because it doesn't use regex which have reserved characters as (
Contains - true if the text contains the regular expression pattern
Substring - true if the text contains the pattern string (case-sensitive)
Upvotes: 2