I need to traverse through the list and reach an element based on required value. Before getting inside the loop to traverse, i want to make sure if that value exists in the response . How can i achieve this using Assert statement?
Here's how I would do this:
import com.eviware.soapui.support.XmlHolder def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ); // Fail if the response does not have the value assert (messageExchange.responseContentAsXml.contains("Value to be checked"));
Looks like we have this topic twice.
@msiadak you response is right on the money
I just gave high level psuedocode.
Thank you very much for this! This worked for me
Glad it worked! Don't forget to "Accept as a solution" so future forum visitors can easily see!
Subject | Author | Latest Post |
---|---|---|