//Importing XML module of SoapUI tool
import com.eviware.soapui.support.XmlHolder
//Access the Get_Employee Response XML and get the value of name tag.
def response=context.expand('${GetEmployee#response}')
def xml=new XmlHolder(response)
def namenode = xml.getNodeValue("//ns:name")
log.info namenode
context.setProperty("name","$namenode")
log.info context.getProperty("name")
//Access the Delete Employee Request XML and store the value grabbed from the Get Employee Response
def requestt = context.expand('${DeleteEmployee#request}')
def xmlreq=new XmlHolder(requestt)
xmlreq.setNodeValue("//typ:guestName", namenode)
//Formatting the xml and put it in the Testcase, Teststeps level
def dxml = xmlreq.getXml()
testRunner.testCase.testSteps["DeleteEmployee"].setPropertyValue("request",dxml)
import com.eviware.soapui.support.XmlHolder
//Access the Get_Employee Response XML and get the value of name tag.
def response=context.expand('${GetEmployee#response}')
def xml=new XmlHolder(response)
def namenode = xml.getNodeValue("//ns:name")
log.info namenode
context.setProperty("name","$namenode")
log.info context.getProperty("name")
//Access the Delete Employee Request XML and store the value grabbed from the Get Employee Response
def requestt = context.expand('${DeleteEmployee#request}')
def xmlreq=new XmlHolder(requestt)
xmlreq.setNodeValue("//typ:guestName", namenode)
//Formatting the xml and put it in the Testcase, Teststeps level
def dxml = xmlreq.getXml()
testRunner.testCase.testSteps["DeleteEmployee"].setPropertyValue("request",dxml)
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDelete