Selenium – Fiddler doesn’t capture traffic from Chrome

fiddlerhttpseleniumselenium-rc

Here is what I have to do :

  1. Open a url in IE/Chrome/Firefox browser.
  2. Do some UI user action (click/submit).
  3. Record http request for a particular http call.

Here is what I did: console application + selenium RC to open url & do the user actions + Fiddler Core to capture that http traffic.

My code works fine when I'm running it in Firefox & IE, but don't know why Fiddler Core not able to capture any http traffic when running it against Chrome.

        ISelenium selenium = new DefaultSelenium("localhost", 4444, "*googlechrome", "http://money.msn.com/");
        selenium.Start();
        selenium.Open("/");
        selenium.WaitForPageToLoad("30000");

Another intersting thing, if I dont use Selenium RC & open Chrome using Process class then I can see fiddler core capturing that http request. But I need a UI automation tool to do the user actions.

Any help will be greatly appriciated.

Thanks.

Best Answer

I hope I do not misinterpret the problem -- I assume localhost traffic to be the thing that cannot be captured.

localhost traffic is routed via the local loopback interface (a 'virtual' interface that routes local traffic more efficiently), and this never reaches a network card. Most packet capture tools capture the packets on the network device driver layer and thus only capture packets that actually go throug physical network devices.