Forum Discussion
Thank you Rao, can you provide any sample code for this.
Regards
Vijay
Hi VijayKumarS ,
Your code shold be something like this
def request1 = testRunner.testCase.testSuite.testCases["GetEmp"].testSteps["GetEmpDtls"].getPropertyValue("Request")
def xml1= new XmlHolder(request1)
def getnode1=xml1.getNodeValue("saxon: parse(//tem:GetEmp/tem:InputParameters)//USER_ID")
log.info ("GetNodeValue : " +getnode1)
-- In this line you are setting the node, it will not return any value
xml1.setNodeValue("saxon: parse(//tem:GetEmp/tem:InputParameters)//USER_ID" , "JACK")
-- Here you to have get the node value after setting it.
def setnode1=xml1.getNodeValue("saxon: parse(//tem:GetEmp/tem:InputParameters)//USER_ID")
log.info ("SetNodeValue : " +setnode1)
-Ashwin
Please give a Kudo and accept it as a solution if this works.
Related Content
- 3 years ago
- 13 years ago
- 2 years ago
- 4 years ago