FiddlerCore Auto-respond with sessions loaded from SAZ file-

2 posts, 0 answers
  1. Kallol
    Kallol avatar
    4 posts
    Member since:
    Jun 2017

    Posted 12 Jul 2017 Link to this post

    Hi,

    I am using FiddlerCore to perform the below functions in order

         - Running fiddler core and storing the sessions in a SAZ file

         - Uploading the SAZ file and load sessions

         - Using autoresponder to respond to a session from the loaded session(if it exists)

    I am using the following code to auto-respond

    foreach (Session loadedSession in loadSessions)
                    {
                        if (loadedSession.fullUrl.Equals(oS.fullUrl))
                        {
                            Console.WriteLine("Session Available in Loaded Session");
                            oS.utilCreateResponseAndBypassServer();
                            oS.requestBodyBytes = loadedSession.responseBodyBytes;
                            oS.oResponse.headers = loadedSession.oResponse.headers;
                            break;
                        }
                    }

    Where loadSessions are loaded from SAZ file

    But I am not getting receiving any response if i open the pages for which the session have been loaded.

    What am I doing wrong and what should be the correct approach.

    Thanks in advance !!!!

  2. Kallol
    Kallol avatar
    4 posts
    Member since:
    Jun 2017

    Posted 14 Jul 2017 in reply to Kallol Link to this post

    Hi,

    Got the answer. used - oS.utilSetResponseBody(loadedResponseBody)

    To set the response of the session where loadedResponseBody is a string from the session which is stored in SAZ file.

    Regards,

    Kallol

Back to Top