Forum Discussion
Aaronliu
14 years agoFrequent Contributor
Get Place Name from Response:
Transfer the Place Name to downline step as Request:
Or maybe you can use script assertion for it:
in step3, we manipulate value with parameters like: ${#TestCase#CityName}
thanks,
Aaron
declare namespace ns1='http://www.webservicex.net';
//ns1:GetCitiesByCountryResponse[1]/ns1:GetCitiesByCountryResult[1]
Transfer the Place Name to downline step as Request:
declare namespace web='http://www.webservicex.net';
//web:GetWeather[1]/web:CityName
Or maybe you can use script assertion for it:
def tc=testRunner.testSuite.testCase
def groovyUtils=new com.eviware.soapui.support.GroovyUtils(context)
def holder=groovyUtils.getXmlHolder(messageExchange.responseContent)
holder.namespaces['ns1']="http://www.webservicex.net"
def CityName=holder.getNodeValue("//ns1:GetCitiesByCountryResponse[1]/ns1:GetCitiesByCountryResult[1]")
tc.setPropertyValue("CityName",CityName)
in step3, we manipulate value with parameters like: ${#TestCase#CityName}
thanks,
Aaron
Related Content
- 5 years ago
- 2 years ago
- 9 years ago