Forum Discussion

googleid_106863's avatar
10 years ago

Getting cookie in TestComplete web services tests


I am calling a WCF service method and trying to read the response on the following event -



function GeneralEvents_OnWebServiceResponse(Sender, Response, Helper, ResponseInfo)


When I display the value of Response.Text or Response.xml values into log(before using them  further in the code), the following are displayed respectively - 


 


Response.Text



 


Response.xml


<?xml version="1.0"?>



 



However, the response which is displayed in Fiddler tool for this sample run on the SilverLight application’s web service contains details about the cookie -


 



Cache-Control: private


Content-Length: 189


Content-Type: application/soap+msbin1


Server: Microsoft-IIS/7.5


X-AspNet-Version: 4.0.30319


Set-Cookie: .ASPXAUTH=9A321F31B667231925A19F3F433C24529CD9DE9283745DF8C515E12A679C63E3A0B59A7054B6157E24279965080981E9BCD632100E23B5CFDC02455BA4193552C67B2FC6E86EF258E205E04D68AF15FAF80223DE231E3C720DC295B89458888212EF1CBEC288FE5FFC70D7E22A5F932868263AA15B8D75EAAF4581652389798193D1FA216BBC8492FABF0F29906B3A5F; expires=Thu, 18-Sep-2014 14:18:22 GMT; path=/; HttpOnly


X-Powered-By: ASP.NET


Date: Tue, 19 Aug 2014 14:18:22 GMT


How can I fetch this cookie into TestComplete scripts for passing as part of the header of subsequent service calls? Please suggest.


 


TestComplete version - 10.10


Silverlight version - 5.0


 


-Siddharth


 

1 Reply