fiddler response time and increase column ip

Intends to look at the recent response to the request of the mobile terminal app, etc., intended to use fillder here to see the operation appium simulation departure request to see the results,
so we need to increase the ip we need in the left panel, response time and other data to facilitate our view

  • fiddler increase in IP address column
    1. Click on the top menu bar rules -> customize rules (shortcut key ctrl + r, or find the right part FiddlerScript label)


2.ctrl + f can be reached at or above the search box to search for "static function main" carriage return

3. Add the following line in the main function, the function call fiddlerUI, ip address display column

FiddlerObject.UI.lvSessions.AddBoundColumn("ServerIP",120,"X-HostIP");


Finally, remember to save, no error will occur if the sound of ding-dong ~



---------------------------------------------------------------------------------------------

  • Increasing the response time of the column
    in the previous step above step 1
    to find class Handlers, add the following code in the following
function BeginRequestTime(oS: Session)
{ if (oS.Timers != null) { return oS.Timers.ClientBeginRequest.ToString(); } return String.Empty; }


public static BindUIColumn("TimeTaken/ms" ,120) function TimeTaken(oS: Session): String{
var sResult = "0";
var t1_ms = oS.Timers.ClientBeginResponse.ToUniversalTime().Millisecond;
var t1_m = oS.Timers.ClientBeginResponse.ToUniversalTime().Minute;
var t1_s = oS.Timers.ClientBeginResponse.ToUniversalTime().Second;
var t1 = t1_m*60*1000 + t1_s*1000 + t1_ms ;
var t2_ms = oS.Timers.ClientDoneRequest.ToUniversalTime().Millisecond;
var t2_m = oS.Timers.ClientDoneRequest.ToUniversalTime().Minute; var t2_s = oS.Timers.ClientDoneRequest.ToUniversalTime().Second;
var t2 = t2_m*60*1000 + t2_s*1000 + t2_ms ;
if(t1 >= t2){
var t3 = t1 - t2;
sResult = t3.toString(); } return sResult; }

function CalcTimingCol(oS: Session){ var sResult = String.Empty; if ((oS.Timers.ServerDoneResponse > oS.Timers.ClientDoneRequest))
{ sResult = (oS.Timers.ServerDoneResponse - oS.Timers.ClientDoneRequest).ToString(); } return sResult; }


To see

Guess you like

Origin www.cnblogs.com/shook/p/12095373.html