Forum Discussion
RJanecek
13 years agoRegular Contributor
Hi,
you can do this assertion without namespace prefixes
also in assertion script you can do this easier: def response = context.expand( '${nameOfTestRequest#Response# //*[local-name()="elementName" and namespace-uri()="yourNameSpaceUri"]}' )
and I am not sure that this can return null so you should also assert:
you can do this assertion without namespace prefixes
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holderResponse = groovyUtils.getXmlHolder( yourXml )
assert holderResponse.getNodeValue( "/*[local-name()='elementName' and namespace-uri()='yourNameSpaceUri']") != null
also in assertion script you can do this easier: def response = context.expand( '${nameOfTestRequest#Response# //*[local-name()="elementName" and namespace-uri()="yourNameSpaceUri"]}' )
and I am not sure that this can return null so you should also assert:
assert response != null && !response.isEmpty()