Forum Discussion
AutUser
15 years agoOccasional Contributor
Hi,
I developed a solution but not sure if it's the most correct one, using string funtions. Any advice would be greatly appreciated. Thanks
import com.eviware.soapui.support.*;
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def _xmlUtil = new com.eviware.soapui.support.xml.XmlUtils();
def holder = groovyUtils.getXmlHolder( "Navigate01 - Start#Response" )
def response = context.expand( '${Navigate01 - Start#Response#//ns:NavigateResponse[1]/ns1:NavigationResults[1]/ns1:NavigationList[1]}' )
IndexFound = response.indexOf('ServerItemId', response.indexOf('1998', 1)) + 13
def ResultServerItemIdFor1998 =response.getAt(IndexFound..IndexFound+3)
I developed a solution but not sure if it's the most correct one, using string funtions. Any advice would be greatly appreciated. Thanks
import com.eviware.soapui.support.*;
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def _xmlUtil = new com.eviware.soapui.support.xml.XmlUtils();
def holder = groovyUtils.getXmlHolder( "Navigate01 - Start#Response" )
def response = context.expand( '${Navigate01 - Start#Response#//ns:NavigateResponse[1]/ns1:NavigationResults[1]/ns1:NavigationList[1]}' )
IndexFound = response.indexOf('ServerItemId', response.indexOf('1998', 1)) + 13
def ResultServerItemIdFor1998 =response.getAt(IndexFound..IndexFound+3)
Related Content
Recent Discussions
- 6 days agoemoya