This is a migrated thread and some comments may be shown as answers.

Detect the end of actReissueSessions

2 Answers 117 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 28 Aug 2015, 01:58 PM

Hi,

I'm using Fiddler to execute x times several sessions.  At the end, I want to export to a file. But if I have a lot of sessions, the export file is incomplete because it doesn't has the time to load all the sessions. How can I detect when all sessions are done and then export ?

Here is the code:  

var oSessions = UI.GetAllSessions();
UI.actRemoveAllSessions();
for (var i:int=0;i<sParams[1];i++)
       UI.actReissueSessions(oSessions,false);
 var oExportOptions = FiddlerObject.createDictionary();
   oExportOptions.Add("Filename", "W:\\Public\\HD\\Paris\\L\\LY Robert\\selenium\\Results\\WAT_charge_" + System.Net.Dns.GetHostName() + "_" +DateTime.Now.ToString("ddMMyyyy_HHmmss")+".har");
   FiddlerApplication.DoExport("HTTPArchive v1.1", oSessions, oExportOptions, null);    

 

Thank you

 

 


2 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 28 Aug 2015, 04:05 PM
There are a number of ways to achieve this; you could, for instance, move your code that exports traffic to the SessionComplete event handler for the last Session you resent, or do other tricks like that.

However, your best bet is to move off of actReissueSessions, which is a call into Fiddler's UI, and instead use the FiddlerApplication.oProxy.SendRequestAndWait method to resend requests to the server.

Regards,
Eric Lawrence
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
0
Rob
Top achievements
Rank 1
answered on 31 Aug 2015, 07:41 AM
Thank you Eric for your reply ! I'll try this. :)
Tags
Fiddler Classic
Asked by
Rob
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Rob
Top achievements
Rank 1
Share this question
or