Fiddler不会从Chrome获取流量 [英] Fiddler doesn't capture traffic from Chrome

查看:131
本文介绍了Fiddler不会从Chrome获取流量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我必须做的事情:

Here is what I have to do :


  1. 在IE / Chrome / Firefox浏览器中打开网址。

  2. 执行一些UI用户操作(单击/提交)。

  3. 记录特定http呼叫的http请求。

这是我做的:控制台应用程序+ selenium RC打开url&做用户操作+ Fiddler Core来捕获那个http流量。

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

当我在Firefox&运行它时,我的代码工作正常IE,但不知道为什么Fiddler Core在针对Chrome运行时无法捕获任何http流量。

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");

另一个有趣的事情,如果我不使用Selenium RC&使用Process类打开Chrome,然后我可以看到fiddler核心捕获该http请求。但我需要一个UI自动化工具来执行用户操作。

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.

谢谢。

推荐答案

我使用以下方式传递代理,它对我有效。

I use the following way to pass proxy and it is working for me.

ChromeOptions options = new ChromeOptions();
options.AddArgument(string.Format("--proxy-server=http={0}:{1};https={0}:{1}", proxyHost, port));
driver = new ChromeDriver(options);

这篇关于Fiddler不会从Chrome获取流量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆