Forum Discussion

dbaray's avatar
dbaray
Occasional Contributor
7 years ago

Using getXMLHolder with parameters?

I've seen tons of examples of getXMLHolder calls passing the teststepname#request or teststepname#response and that works fine. However, my input XML arrives via CSV file and gets assigned to DataSou...
  • Radford's avatar
    Radford
    7 years ago

    I don't use the XML holder to manipulate XML so there may be a better way to use it, but the holder has a "getXml()" method which returns a string so you should be able to do something like.

     

    testRunner.testCase.setPropertyValue("paramXML", holder.getXml())

    The holder is an instance of the XmlHolder class.

     

    (As an aside I use the XmlSlurper and XmlParser to manipulate XML I personally find it a little bit more intuitive than the groovy utils / XML holder method.)