shabar
11 years agoContributor
[Resolved] Square Brackets in result output
Hi All
I am getting extra [] in my output with the following code
How can I get rid of this
Expected result : OK
Actual result : [OK]
Cheers
I am getting extra [] in my output with the following code
How can I get rid of this
<GeocodeResponse>
<status>OK</status>
<result>
<type>locality</type>
<type>political</type>
.......
def ui = com.eviware.soapui.support.UISupport
//get the xml reponse for the defined test step
def ResponseAsXml = context.expand( '${Simple Search#ResponseAsXml}')
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);
def holder = groovyUtils.getXmlHolder(ResponseAsXml);
def status= holder.getNodeValues("//GeocodeResponse//status") as String;
testRunner.testCase.testSuite.setPropertyValue( "result",status)
Expected result : OK
Actual result : [OK]
Cheers