if (oSession.oResponse.headers.ExistsAndContains("Content-Type","html")){
oSession.utilDecodeResponse();
var oBodyString = oSession.GetResponseBodyAsString();
oSession["ui-color"]="yellow";
var regex = /String/gi ;
if (!oSession.uriContains("google")){
if (regex.test(oBodyString)) {
oSession.oRequest.FailSession(404, "Blocked", "Fiddler blocked the file");
}
}
}
Sometimes I have to refresh the page for it to work properly, Why is that? How to make it more foolproof ?
Thank you
oSession.utilDecodeResponse();
var oBodyString = oSession.GetResponseBodyAsString();
oSession["ui-color"]="yellow";
var regex = /String/gi ;
if (!oSession.uriContains("google")){
if (regex.test(oBodyString)) {
oSession.oRequest.FailSession(404, "Blocked", "Fiddler blocked the file");
}
}
}
Sometimes I have to refresh the page for it to work properly, Why is that? How to make it more foolproof ?
Thank you