Forum Discussion
- nmraoChampion Level 3Unclear. Can the question be more specific possible with any example or screen shot etc?
- JamesChorusNew Contributor
Hi Rao,
I am also trying to do what the original user was asking. This is where you have your request set up, You are on the Assertions tab, and you wish to add in multiple/a list of assertions in One "Contains Assertion" check.
So, how do you separate each value you wish to check for? OR are you only able to add one Contains Assertion value per Assertion?
Thanks, James
- nmraoChampion Level 3Not sure I got it quite right. It is general practise that, there should be a separate assertion for each value. This is really helpful to know in case of failures.
- naveen8944Contributor
Having individual assertions is the standard approach. But if you still wish to do that, you can't do that on Contains assertion. But you can use XPath assertion and have Contains function
Your declaration would be:
contains(//*:ResponseFiled, "ValueToValidate1") and contains(//*:ResponseField, "ValueToValidate2")
Expected would be: true
Hope that helps
Related Content
- 7 years ago
Recent Discussions
- 22 days ago