def projectpath = testRunner.testCase.testSuite.project def testSuitePath = testRunner.testCase.testSuite def testCasePath = testRunner.testCase def xmlNew = projectpath.testSuites["Positive Scenarios_7.0_2022"].testCases["Master Schedule"].testSteps["HTTP Request Section-GETPATTERN_copy"].getPropertyValue("ResponseAsXml") //log.info projectpath.testSuites["Positive Scenarios_7.0_2022"].testCases["Master Schedule"].testSteps["HTTP Request Section-GETPATTERN_copy"].getPropertyValue("ResponseAsXml") XmlParser parser = new XmlParser() def result = context.expand( '${Groovy Script#result}' ) //return xmlNew def parseBodyObject = new XmlSlurper().parseText(xmlNew) def findAllPtags = parseBodyObject.children().depthFirst().findAll { it.name() == 'id'} def docText = new StringBuilder() findAllPtags.each { id -> docText.append(""+id) } //def docText = new StringBuilder() //return docText log.info docText //testRunner.testCase.testSteps["HTTP Request Section - DELETE"].setPropertyValue( "Response","Response") //projectpath.setPropertyValue("C","RestAPI") //testSuitePath.setPropertyValue("SectionID","${docText}") testCasePath.setPropertyValue("SectionID","${docText}")