dinojadhavOccasional ContributorJoined 6 years ago19 Posts1 LikeLikes received2 SolutionsView All Badges
ContributionsMost RecentMost LikesSolutionsRe: Request is not captured with the groovy script showing NULL I guess this is code which is not working : else{ def RQHolder = groovyUtils.getXmlHolder(StepName.toString()+"#Request") RQHolder.namespaces["xmlns"] = "http://webservices.sabre.com/sabreXML/2003/07" def nodeRQ = RQHolder.getNodeValue("//xmlns:SabreCommandLLSRQ/xmlns:Request/xmlns:HostCommand") Re: Request is not captured with the groovy script showing NULL Hi Chris, I am a bit new to groovy and correct me if I am wrong here. Below is the sameple request and response : Here Add Itinerary is my Test Step Name and which execute 01Y5 command and the line " 1 ET 105Y......" is the response of that command. In my case I am getting result as " Add Itinerary : NULL" means the command is not captured : Add Itinerary : 01Y5 Add Itinerary : 1 ET 105Y 07JUN M MQXADD SS1 255P 420P /E ARR-TERMINAL 1 Re: Request is not captured with the groovy script showing NULLRequest is not captured with the groovy script showing NULL Hi All, I have the below script to generate a log file of a complete Test case however, the request is not at all captured dont know what exactly the issue is : Below is the script : import com.eviware.soapui.support.GroovyUtils import com.eviware.soapui.support.XmlHolder import jxl.*; import jxl.write.* import org.apache.commons.lang.StringUtils def Time = new Date().format("dd-MMM-yyyy h_mm_ss a") def directory = testRunner.testCase.testSuite.project.getPropertyValue("Logs") File fold = new File (directory) fold.mkdir () def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) //Project Name: def ProjectName=testRunner.testCase.testSuite.project.name //TestSuite Name: def TestSuiteName=testRunner.testCase.testSuite.name //Test Case Name: def TestCaseName=testRunner.getTestCase().getName() //Creating File def responseFile = new File (directory,TestCaseName+"_${Time}"+".txt") def TestCaseDescription = testRunner.testCase.getDescription() responseFile.append ("Project Name :${ProjectName}\n\n") responseFile.append ("TestSuite Name :${TestSuiteName}\n\n") responseFile.append ("TestSuite Name :${TestCaseName}\n\n") //def testCaseCount = testRunner.testCase.testSuites[TestSuiteName].getTestCaseCount() def count = testRunner.testCase.getTestStepCount() for (i=1;i<count;i++){ def StepName = testRunner.testCase.getTestStepAt(i).getName() if (StepName.toString()== "GetUpdateToken" || StepName.toString()== "Delay" || StepName.toString()== "Logfile" ) log.info StepName else if (StepName.toString()== "GetReservation" || StepName.toString()== "UpdateReservation_Add_Hotel_Segment") { log.info StepName responseFile.append ("TestStep Name :${StepName}\n") def requestName = "\n****************REQUEST****************\n\n" responseFile.append(requestName, "UTF-8") def request = testRunner.testCase.testSteps[StepName].testRequest.response.getRequestContent() //log.info request responseFile.append(request, "UTF-8") def responseName = "\n\n****************RESPONSE****************\n\n" responseFile.append(responseName, "UTF-8") def response = testRunner.testCase.testSteps[StepName].testRequest.response.getResponseContent() //log.info response.toString() responseFile.append(response, "UTF-8") responseFile.append("\n\n") } else{ def RQHolder = groovyUtils.getXmlHolder(StepName.toString()+"#Request") RQHolder.namespaces["xmlns"] = "http://webservices.sabre.com/sabreXML/2003/07" def nodeRQ = RQHolder.getNodeValue("//xmlns:SabreCommandLLSRQ/xmlns:Request/xmlns:HostCommand") def RSholder = groovyUtils.getXmlHolder(StepName.toString()+"#Response") RSholder.namespaces["xmlns"] = "http://webservices.sabre.com/sabreXML/2003/07" def nodeRS = RSholder.getNodeValue("//xmlns:SabreCommandLLSRS/xmlns:Response") def Name = testRunner.testCase.testSuite.getName() responseFile.append (context.expand(StepName.toString()+ "Step Request: ${nodeRQ}\n")) responseFile.append (context.expand(StepName.toString()+ "Step Response: ${nodeRS}\n\n")) } } In log file the request is showing NULL. Re: Help with Date conversion as per the required format - groovy Hi Sonia, I have found a solution. Thanks for the concern. Best Regards, Dinesh Re: How to get all the values from a duplicate tag and set the same in properties using groovy I will store those values and then assert them with the values coming in other responses. Is there a way to fetch values from the list. Re: How to capture multiple lines response using groovy script Hi Rao, Thanks for your support. I tried your script and able to split the multiple lines data, but how to set a particular data. Below is my actual response : Mon Nov 04 12:01:57 IST 2019:INFO:AM FACTS 1.SSR GSTN AM HK1/IND/22SSSSAAA0 1.1 UHVNKSK/KGRXXZ 0A1Z5/IBM/S 2.SSR GSTN AM HK1/IND/22DDDDDDDD 1.1 UHVNKSK/KGRXXZ DD1Z5/IBM/P and I want to capture and set below data from above response : 1.SSR GSTN AM HK1/IND/22SSSSAAA0 then how to capture and set that. How to get all the values from a duplicate tag and set the same in properties using groovy Hello All, I have below XML response and want to capture all the values coming in a "FullText" tag.<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"> <soap-env:Header> <eb:MessageHeader eb:version="1.0" soap-env:mustUnderstand="1" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader"> <eb:From> <eb:PartyId eb:type="URI">123123</eb:PartyId> </eb:From> <eb:To> <eb:PartyId eb:type="URI">99999</eb:PartyId> </eb:To> <eb:CPAId>AAS</eb:CPAId> <eb:ConversationId>test</eb:ConversationId> <eb:Service eb:type="OTA">CDI</eb:Service> <eb:Action>getReservationRS</eb:Action> <eb:MessageData> <eb:MessageId>732934421208470870</eb:MessageId> <eb:Timestamp>2019-10-30T11:42:01</eb:Timestamp> <eb:RefToMessageId>mid:20001209-133003-2333@clientofsabre.com</eb:RefToMessageId> </eb:MessageData> </eb:MessageHeader> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"> <wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/STSB!ICESMSLB\/STS.LB!-2958029294769305206!947761!0</wsse:BinarySecurityToken> </wsse:Security> </soap-env:Header> <soap-env:Body> <stl19:GetReservationRS Version="1.19.0" xmlns:stl19="http://webservices.sabre.com/pnrbuilder/v1_19" xmlns:ns6="http://services.sabre.com/res/orr/v0" xmlns:or114="http://services.sabre.com/res/or/v1_14" xmlns:raw="http://tds.sabre.com/itinerary" xmlns:ns4="http://webservices.sabre.com/pnrconn/ReaccSearch"> <stl19:Reservation numberInParty="2" numberOfInfants="0" NumberInSegment="2" hostMarketedCodeShare="true"> <stl19:BookingDetails> <stl19:RecordLocator>IVUTDX</stl19:RecordLocator> <stl19:CreationTimestamp>2019-10-30T06:41:00</stl19:CreationTimestamp> <stl19:SystemCreationTimestamp>2019-10-30T06:41:00</stl19:SystemCreationTimestamp> <stl19:CreationAgentID>DJL</stl19:CreationAgentID> <stl19:UpdateTimestamp>2019-10-30T06:41:59</stl19:UpdateTimestamp> <stl19:PNRSequence>2</stl19:PNRSequence> <stl19:FlightsRange Start="2019-11-20T20:50:00" End="2019-11-23T04:50:00"/> <stl19:DivideSplitDetails/> <stl19:EstimatedPurgeTimestamp>2019-11-22T00:00:00</stl19:EstimatedPurgeTimestamp> <stl19:UpdateToken>-40f1ee0d3c43ffa7e317052347c74ab6f00fc159d2c3a361</stl19:UpdateToken> </stl19:BookingDetails> <stl19:POS AirExtras="false" InhibitCode="U"> <stl19:Source BookingSource="GH35" AgentSine="DJL" PseudoCityCode="GH35" ISOCountry="DE" AgentDutyCode="*" AirlineVendorID="AA" HomePseudoCityCode="HDQ" PrimeHostID="1S"/> </stl19:POS> <stl19:PassengerReservation> <stl19:Passengers> <stl19:Passenger id="20" nameType="S" passengerType="ADT" nameId="01.01" nameAssocId="1" elementId="pnr-20.1"> <stl19:LastName>ZEEYEVU</stl19:LastName> <stl19:FirstName>TYFEXH</stl19:FirstName> <stl19:SpecialRequests> <stl19:GenericSpecialRequest id="25" type="A" msgType="S"> <stl19:Code>GSTN</stl19:Code> <stl19:FreeText>/IND/22WWWWWWWW0A1Z5/IBM/P</stl19:FreeText> <stl19:ActionCode>HK</stl19:ActionCode> <stl19:NumberInParty>1</stl19:NumberInParty> <stl19:AirlineCode>AA</stl19:AirlineCode> <stl19:FullText>GSTN AA HK1/IND/22WWWWWWWW0A1Z5/IBM/P</stl19:FullText> </stl19:GenericSpecialRequest> <stl19:GenericSpecialRequest id="26" type="A" msgType="S"> <stl19:Code>GSTN</stl19:Code> <stl19:FreeText>/IND/22DDDWWWWW0A2S5/IBM/U</stl19:FreeText> <stl19:ActionCode>HK</stl19:ActionCode> <stl19:NumberInParty>1</stl19:NumberInParty> <stl19:AirlineCode>AA</stl19:AirlineCode> <stl19:FullText>GSTN AA HK1/IND/22DDDWWWWW0A2S5/IBM/U</stl19:FullText> </stl19:GenericSpecialRequest> </stl19:SpecialRequests> <stl19:Seats/> </stl19:Passenger> <stl19:Passenger id="22" nameType="S" passengerType="ADT" nameId="02.01" nameAssocId="2" elementId="pnr-22.2"> <stl19:LastName>NHFKDBG</stl19:LastName> <stl19:FirstName>SVHJIT</stl19:FirstName> <stl19:SpecialRequests> <stl19:GenericSpecialRequest id="27" type="A" msgType="S"> <stl19:Code>GSTN</stl19:Code> <stl19:FreeText>/IND/22SSSSAAA00A1Z5/IBM/S</stl19:FreeText> <stl19:ActionCode>HK</stl19:ActionCode> <stl19:NumberInParty>1</stl19:NumberInParty> <stl19:AirlineCode>AA</stl19:AirlineCode> <stl19:FullText>GSTN AA HK1/IND/22SSSSAAA00A1Z5/IBM/S</stl19:FullText> </stl19:GenericSpecialRequest> <stl19:GenericSpecialRequest id="28" type="A" msgType="S"> <stl19:Code>GSTN</stl19:Code> <stl19:FreeText>/IND/22DDDDDDDDDD1Z5/IBM/P</stl19:FreeText> <stl19:ActionCode>HK</stl19:ActionCode> <stl19:NumberInParty>1</stl19:NumberInParty> <stl19:AirlineCode>AA</stl19:AirlineCode> <stl19:FullText>GSTN AA HK1/IND/22DDDDDDDDDD1Z5/IBM/P</stl19:FullText> </stl19:GenericSpecialRequest> </stl19:SpecialRequests> <stl19:Seats/> </stl19:Passenger> </stl19:Passengers> <stl19:Segments> <stl19:Poc> <stl19:Airport>EZE</stl19:Airport> <stl19:Departure>2019-11-20T20:50:00</stl19:Departure> </stl19:Poc> <stl19:Segment sequence="1" id="3"> <stl19:Air id="3" sequence="1" segmentAssociationId="2" isPast="false" DayOfWeekInd="3" CodeShare="false" SpecialMeal="false" SmokingAllowed="false" ResBookDesigCode="Y"> <stl19:DepartureAirport>EZE</stl19:DepartureAirport> <stl19:DepartureAirportCodeContext>IATA</stl19:DepartureAirportCodeContext> <stl19:ArrivalAirport>MIA</stl19:ArrivalAirport> <stl19:ArrivalAirportCodeContext>IATA</stl19:ArrivalAirportCodeContext> <stl19:OperatingAirlineCode>AA</stl19:OperatingAirlineCode> <stl19:OperatingAirlineShortName>AMERICAN AIRLINES</stl19:OperatingAirlineShortName> <stl19:OperatingFlightNumber>0900</stl19:OperatingFlightNumber> <stl19:EquipmentType>77W</stl19:EquipmentType> <stl19:MarketingAirlineCode>AA</stl19:MarketingAirlineCode> <stl19:MarketingFlightNumber>0900</stl19:MarketingFlightNumber> <stl19:OperatingClassOfService>Y</stl19:OperatingClassOfService> <stl19:MarketingClassOfService>Y</stl19:MarketingClassOfService> <stl19:MarriageGrp> <stl19:Ind>0</stl19:Ind> <stl19:Group>0</stl19:Group> <stl19:Sequence>0</stl19:Sequence> </stl19:MarriageGrp> <stl19:Seats/> <stl19:AirlineRefId>DCAA*IVUTDX</stl19:AirlineRefId> <stl19:Eticket>true</stl19:Eticket> <stl19:DepartureDateTime>2019-11-20T20:50:00</stl19:DepartureDateTime> <stl19:ArrivalDateTime>2019-11-21T04:10:00</stl19:ArrivalDateTime> <stl19:FlightNumber>0900</stl19:FlightNumber> <stl19:ClassOfService>Y</stl19:ClassOfService> <stl19:ActionCode>HK</stl19:ActionCode> <stl19:NumberInParty>2</stl19:NumberInParty> <stl19:SegmentSpecialRequests/> <stl19:inboundConnection>false</stl19:inboundConnection> <stl19:outboundConnection>false</stl19:outboundConnection> <stl19:ScheduleChangeIndicator>false</stl19:ScheduleChangeIndicator> <stl19:SegmentBookedDate>2019-10-30T06:41:00</stl19:SegmentBookedDate> <stl19:Pos> <stl19:IataNumber>2323972</stl19:IataNumber> <stl19:AgencyCityCode>STR</stl19:AgencyCityCode> <stl19:CountryCode>DE</stl19:CountryCode> <stl19:DutyCode>*</stl19:DutyCode> </stl19:Pos> <stl19:Banner>MARKETED BY AMERICAN AIRLINES</stl19:Banner> <stl19:Informational>false</stl19:Informational> </stl19:Air> </stl19:Segment> <stl19:Segment sequence="2" id="9"> <stl19:Air id="9" sequence="2" segmentAssociationId="3" isPast="false" DayOfWeekInd="4" CodeShare="false" SpecialMeal="false" SmokingAllowed="false" ResBookDesigCode="Y"> <stl19:DepartureAirport>MIA</stl19:DepartureAirport> <stl19:DepartureAirportCodeContext>IATA</stl19:DepartureAirportCodeContext> <stl19:ArrivalAirport>EZE</stl19:ArrivalAirport> <stl19:ArrivalAirportCodeContext>IATA</stl19:ArrivalAirportCodeContext> <stl19:OperatingAirlineCode>AA</stl19:OperatingAirlineCode> <stl19:OperatingAirlineShortName>AMERICAN AIRLINES</stl19:OperatingAirlineShortName> <stl19:OperatingFlightNumber>0907</stl19:OperatingFlightNumber> <stl19:EquipmentType>772</stl19:EquipmentType> <stl19:MarketingAirlineCode>AA</stl19:MarketingAirlineCode> <stl19:MarketingFlightNumber>0907</stl19:MarketingFlightNumber> <stl19:OperatingClassOfService>Y</stl19:OperatingClassOfService> <stl19:MarketingClassOfService>Y</stl19:MarketingClassOfService> <stl19:MarriageGrp> <stl19:Ind>0</stl19:Ind> <stl19:Group>0</stl19:Group> <stl19:Sequence>0</stl19:Sequence> </stl19:MarriageGrp> <stl19:Seats/> <stl19:AirlineRefId>DCAA*IVUTDX</stl19:AirlineRefId> <stl19:Eticket>true</stl19:Eticket> <stl19:DepartureDateTime>2019-11-21T20:00:00</stl19:DepartureDateTime> <stl19:ArrivalDateTime>2019-11-22T07:07:00</stl19:ArrivalDateTime> <stl19:FlightNumber>0907</stl19:FlightNumber> <stl19:ClassOfService>Y</stl19:ClassOfService> <stl19:ActionCode>HK</stl19:ActionCode> <stl19:NumberInParty>2</stl19:NumberInParty> <stl19:SegmentSpecialRequests/> <stl19:inboundConnection>false</stl19:inboundConnection> <stl19:outboundConnection>false</stl19:outboundConnection> <stl19:ScheduleChangeIndicator>false</stl19:ScheduleChangeIndicator> <stl19:SegmentBookedDate>2019-10-30T06:41:00</stl19:SegmentBookedDate> <stl19:Pos> <stl19:IataNumber>2323972</stl19:IataNumber> <stl19:AgencyCityCode>STR</stl19:AgencyCityCode> <stl19:CountryCode>DE</stl19:CountryCode> <stl19:DutyCode>*</stl19:DutyCode> </stl19:Pos> <stl19:Banner>MARKETED BY AMERICAN AIRLINES</stl19:Banner> <stl19:Informational>false</stl19:Informational> </stl19:Air> </stl19:Segment> <stl19:Segment sequence="3" id="15"> <stl19:Air id="15" sequence="3" segmentAssociationId="4" isPast="false" DayOfWeekInd="5" CodeShare="false" SpecialMeal="false" SmokingAllowed="false" ResBookDesigCode="Y"> <stl19:DepartureAirport>EZE</stl19:DepartureAirport> <stl19:DepartureAirportCodeContext>IATA</stl19:DepartureAirportCodeContext> <stl19:ArrivalAirport>MIA</stl19:ArrivalAirport> <stl19:ArrivalAirportCodeContext>IATA</stl19:ArrivalAirportCodeContext> <stl19:OperatingAirlineCode>4M</stl19:OperatingAirlineCode> <stl19:OperatingAirlineShortName>LATAM AIRLINES ARGENTINA</stl19:OperatingAirlineShortName> <stl19:OperatingFlightNumber>7820</stl19:OperatingFlightNumber> <stl19:EquipmentType>763</stl19:EquipmentType> <stl19:MarketingAirlineCode>AA</stl19:MarketingAirlineCode> <stl19:MarketingFlightNumber>7836</stl19:MarketingFlightNumber> <stl19:OperatingClassOfService>Y</stl19:OperatingClassOfService> <stl19:MarketingClassOfService>Y</stl19:MarketingClassOfService> <stl19:CodeShareOperatingRecordLocator>IVUTMY</stl19:CodeShareOperatingRecordLocator> <stl19:MarriageGrp> <stl19:Ind>0</stl19:Ind> <stl19:Group>0</stl19:Group> <stl19:Sequence>0</stl19:Sequence> </stl19:MarriageGrp> <stl19:Seats/> <stl19:AirlineRefId>DCAA*IVUTDX</stl19:AirlineRefId> <stl19:Eticket>true</stl19:Eticket> <stl19:DepartureDateTime>2019-11-22T21:35:00</stl19:DepartureDateTime> <stl19:ArrivalDateTime>2019-11-23T04:50:00</stl19:ArrivalDateTime> <stl19:FlightNumber>7836</stl19:FlightNumber> <stl19:ClassOfService>Y</stl19:ClassOfService> <stl19:ActionCode>HK</stl19:ActionCode> <stl19:NumberInParty>2</stl19:NumberInParty> <stl19:SegmentSpecialRequests/> <stl19:inboundConnection>false</stl19:inboundConnection> <stl19:outboundConnection>false</stl19:outboundConnection> <stl19:ScheduleChangeIndicator>false</stl19:ScheduleChangeIndicator> <stl19:SegmentBookedDate>2019-10-30T06:41:00</stl19:SegmentBookedDate> <stl19:Pos> <stl19:IataNumber>2323972</stl19:IataNumber> <stl19:AgencyCityCode>STR</stl19:AgencyCityCode> <stl19:CountryCode>DE</stl19:CountryCode> <stl19:DutyCode>*</stl19:DutyCode> </stl19:Pos> <stl19:Banner>MARKETED BY AMERICAN AIRLINES</stl19:Banner> <stl19:Informational>false</stl19:Informational> </stl19:Air> </stl19:Segment> </stl19:Segments> <stl19:TicketingInfo> <stl19:TicketingTimeLimit id="29" index="1" elementId="pnr-29"> <stl19:Time>TL30</stl19:Time> </stl19:TicketingTimeLimit> </stl19:TicketingInfo> <stl19:ItineraryPricing/> </stl19:PassengerReservation> <stl19:ReceivedFrom> <stl19:Name>QA</stl19:Name> </stl19:ReceivedFrom> <stl19:PhoneNumbers> <stl19:PhoneNumber id="24" index="1" elementId="pnr-24"> <stl19:CityCode>STR</stl19:CityCode> <stl19:Number>594999</stl19:Number> </stl19:PhoneNumber> </stl19:PhoneNumbers> <stl19:EmailAddresses/> <stl19:OpenReservationElements> <or114:OpenReservationElement id="25" type="SRVC" elementId="pnr-25"> <or114:ServiceRequest actionCode="HK" airlineCode="AA" code="GSTN" serviceCount="1" serviceType="SSR" ssrType="AFX"> <or114:FreeText>/IND/22WWWWWWWW0A1Z5/IBM/P</or114:FreeText> <or114:FullText>GSTN AA HK1/IND/22WWWWWWWW0A1Z5/IBM/P</or114:FullText> </or114:ServiceRequest> <or114:NameAssociation> <or114:LastName>ZEEYEVU</or114:LastName> <or114:FirstName>TYFEXH</or114:FirstName> <or114:NameRefNumber>01.01</or114:NameRefNumber> </or114:NameAssociation> </or114:OpenReservationElement> <or114:OpenReservationElement id="26" type="SRVC" elementId="pnr-26"> <or114:ServiceRequest actionCode="HK" airlineCode="AA" code="GSTN" serviceCount="1" serviceType="SSR" ssrType="AFX"> <or114:FreeText>/IND/22DDDWWWWW0A2S5/IBM/U</or114:FreeText> <or114:FullText>GSTN AA HK1/IND/22DDDWWWWW0A2S5/IBM/U</or114:FullText> </or114:ServiceRequest> <or114:NameAssociation> <or114:LastName>ZEEYEVU</or114:LastName> <or114:FirstName>TYFEXH</or114:FirstName> <or114:NameRefNumber>01.01</or114:NameRefNumber> </or114:NameAssociation> </or114:OpenReservationElement> <or114:OpenReservationElement id="27" type="SRVC" elementId="pnr-27"> <or114:ServiceRequest actionCode="HK" airlineCode="AA" code="GSTN" serviceCount="1" serviceType="SSR" ssrType="AFX"> <or114:FreeText>/IND/22SSSSAAA00A1Z5/IBM/S</or114:FreeText> <or114:FullText>GSTN AA HK1/IND/22SSSSAAA00A1Z5/IBM/S</or114:FullText> </or114:ServiceRequest> <or114:NameAssociation> <or114:LastName>NHFKDBG</or114:LastName> <or114:FirstName>SVHJIT</or114:FirstName> <or114:NameRefNumber>02.01</or114:NameRefNumber> </or114:NameAssociation> </or114:OpenReservationElement> <or114:OpenReservationElement id="28" type="SRVC" elementId="pnr-28"> <or114:ServiceRequest actionCode="HK" airlineCode="AA" code="GSTN" serviceCount="1" serviceType="SSR" ssrType="AFX"> <or114:FreeText>/IND/22DDDDDDDDDD1Z5/IBM/P</or114:FreeText> <or114:FullText>GSTN AA HK1/IND/22DDDDDDDDDD1Z5/IBM/P</or114:FullText> </or114:ServiceRequest> <or114:NameAssociation> <or114:LastName>NHFKDBG</or114:LastName> <or114:FirstName>SVHJIT</or114:FirstName> <or114:NameRefNumber>02.01</or114:NameRefNumber> </or114:NameAssociation> </or114:OpenReservationElement> </stl19:OpenReservationElements> </stl19:Reservation> </stl19:GetReservationRS> </soap-env:Body> </soap-env:Envelope> I have used below groovy script and able to print all the values but unable to set the same in property. I want each value to be set in property : import com.eviware.soapui.support.GroovyUtils import com.eviware.soapui.support.XmlHolder def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) def xmlHolder = groovyUtils.getXmlHolder("GetReservation#Response") def val = xmlHolder["//*:FullText"] def count = xmlHolder["count(//*:FullText)"] def SsrFullText=""; log.info count for(i=1;i<count.toInteger();i++){ //log.info val[i] // it will print all the values from duplicate SSR Text SsrFullText=val[i]; log.info SsrFullText context.testCase.testSuite.setPropertyValue('SsrFullText',SsrFullText) } Re: How to capture multiple lines response using groovy script I am trying to capture all the values as stated in my query. Didn't understand what do you expect in as use case. Could you please explain in detail. Re: How to capture multiple lines response using groovy script Hi All, Any thoughts on my query