Pending Review
Last Updated: 14 Nov 2019 14:00 by ADMIN
Elroid
Created on: 07 Nov 2019 14:53
Type: Bug Report
0
oSession.SaveResponseBody sometimes saves json as readable text, sometimes as garbled unreadable mishmash.

Run 1 Example 1 (first 32 characters): {"SummaryTracker":null,"Column1

Run 2 Example 2 (first 32 characters):  ¢ €ªªªêÿteÐ(È„´47ó ¯*·:˜y@X

CustomRules.js

if (oSession.uriContains("/yadayada?Id=")) 
{
var qs = oSession.fullUrl.ToString;
var qsT = oSession.fullUrl.Split("=");
var qsone = qsT[1] + "_ABC";
oSession.SaveResponseBody("C:\\temp\\" + qsone + ".json");
}

Using latest Chrome as browser. Running fine for many months until 1 November 2019, Boom! Can anyone tell me what is going on? It appears to be random.

Thanks!

2 comments
ADMIN
Boby
Posted on: 14 Nov 2019 14:00

Hello Elroid,

It seems that the response body is encoded, e.g. with gzip or similar.

You could enable the Decode option from the main toolbar, or use oSession.utilDecodeResponse() method to decode the content in the script. 

Regards,
Boby
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Elroid
Posted on: 08 Nov 2019 14:25
Data appears to show up correctly when viewing sessions in saved SAZ file. It is just not saving to file correctly in random instances.