Forum Discussion
SiKing
11 years agoCommunity Expert
As an XPath assertion
As a Script assertion
exists(//*:State[text()='CA'] | //*:State[text()='AZ'] | //*:State[text()='OR'] | //*:State[text()='MA'])
As a Script assertion
def state = context.expand('${' + context.currentStep.name + '#ResponseAsXml#//*:State}')
assert ['CA', 'AZ', 'OR', 'MA'].contains(state)
- aedahh8 years agoNew Contributor
Hello, newbie to soapui here...
The answers provided seem to be for response content that is XML only not JSON, is this correct?
How would assert for contains multiple values on a json response that is something like this:
{
"result": true,
"content": [
"abc",
"def",
"ijk",
[... <more content>...]
]
}Thanks
Related Content
Recent Discussions
- 14 hours ago
- 17 days ago