Fiddler core, targetSession.fullUrl is not matching to the image url on the page

I am using Selenium webdriver, c# bindings and fiddler core. I am using fiddler core to get the response back from the image on the page of the application.

At the moment while I can output the targetSession.fullUrl for the url and the targetSession.status, for some reason its not matching for a logic test.

I'm out of ideas at the moment about why this is not working.

// Hook up the event for monitoring proxied traffic.
FiddlerApplication.AfterSessionComplete += delegate(Session targetSession)
{
    // Outputs the image url along with the other resources
    Console.WriteLine("Requested resource from URL {0} responseCode {1}",
    targetSession.fullUrl, targetSession.responseCode);

    // does output the one item with an response code that is not 200
   if (targetSession.responseCode != 200)
   {
    Console.WriteLine("Incorrect Status: {0}, {1}, {2} ", targetSession.fullUrl, 
    targetSession.responseCode, targetSession.RequestMethod);
   }

   // neither of these match the image url
   if (targetSession.fullUrl == targeturl && targetSession.responseCode == 200)
   {
    Console.WriteLine("Image is present: " + targetSession.fullUrl);
   }
   else if (targetSession.fullUrl == targeturl && targetSession.responseCode != 200)
   {
    Console.WriteLine("Image is not present: " + targetSession.fullUrl + 
    targetSession.responseCode);
   }
};

Answers


What are the expected and actual results? Did you maybe forget to enable HTTPS decryption? Did you check to see whether the URL on the page does a HTTP/3xx redirect to a different image?


Need Your Help

sql like clause multiple values

sql tsql

I have a table with multiple words, from 1 to n.

Unable to add service client for a net.tcp WCF service

c# asp.net .net wcf tcp

I am trying to add a client for a WCF service that is net.tcp based. When I use "Add Service Reference" and provide this URL:net.tcp://localhost/service1.svc, it gives following error.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.