Forum Discussion
Vipin_TV
17 years agoOccasional Contributor
Hi,
I was just thinking of this scenario where the value "ProductionSource" comes from Property Step. How would i be able to proceed on the same?
Tried the Following, but was unable to proceed.
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);
def holder = groovyUtils.getXmlHolder( "Test Request: login#Response" );
holder.namespaces["ns"] = "http://mytest.com/ns/MyResults";
def nodeValueStringArray = holder.getNodeValues("//ns:GetMyResult/ns:MyResult[ns:ResultSource=${AddProperties#ResultSourceName}]/ns:ResultKey");
testRunner.testCase.testSuite.setPropertyValue( "MyResultKey", nodeValueStringArray[0]);
Here, AddProperties is the Properties Step and ResultSourceName is the Property which has the value ProductionSource.
Thanks in Advance,
Vipin.
I was just thinking of this scenario where the value "ProductionSource" comes from Property Step. How would i be able to proceed on the same?
Tried the Following, but was unable to proceed.
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context);
def holder = groovyUtils.getXmlHolder( "Test Request: login#Response" );
holder.namespaces["ns"] = "http://mytest.com/ns/MyResults";
def nodeValueStringArray = holder.getNodeValues("//ns:GetMyResult/ns:MyResult[ns:ResultSource=${AddProperties#ResultSourceName}]/ns:ResultKey");
testRunner.testCase.testSuite.setPropertyValue( "MyResultKey", nodeValueStringArray[0]);
Here, AddProperties is the Properties Step and ResultSourceName is the Property which has the value ProductionSource.
Thanks in Advance,
Vipin.