sonata
13 years agoNew Contributor
Groovy.lang Missing property extension
Hi All,
I am a newbie. stuck with a silly issue.
In the attachment below is the xml response of a request. while i try to run the below script to check the condition expirationTime>33, i get the error groovy.lang.missingpropertyexception no such property: expirationTime for class. any help on how to get over this error?
def alert = com.eviware.soapui.support.UISupport;
def inputFile = new File("C:\\response.xml")
if(!inputFile.exists())
{
//Display an alert if the file is not found.
alert.showInfoMessage("Input File 'Response.xml' not found!");
}
else
{
def InputXML = new XmlParser().parseText(inputFile.text);
def InputRow = InputXML.return..findAll{ it.expirationTime.text().toInteger() > 33};
InputRow.each{
log.info(it.userId.text());
}
}
I am a newbie. stuck with a silly issue.
In the attachment below is the xml response of a request. while i try to run the below script to check the condition expirationTime>33, i get the error groovy.lang.missingpropertyexception no such property: expirationTime for class. any help on how to get over this error?
def alert = com.eviware.soapui.support.UISupport;
def inputFile = new File("C:\\response.xml")
if(!inputFile.exists())
{
//Display an alert if the file is not found.
alert.showInfoMessage("Input File 'Response.xml' not found!");
}
else
{
def InputXML = new XmlParser().parseText(inputFile.text);
def InputRow = InputXML.return..findAll{ it.expirationTime.text().toInteger() > 33};
InputRow.each{
log.info(it.userId.text());
}
}