This is a migrated thread and some comments may be shown as answers.

Fiddler4 not working with selenium(chrome web driver)

2 Answers 804 Views
FiddlerCore
This is a migrated thread and some comments may be shown as answers.
Avinash
Top achievements
Rank 1
Avinash asked on 10 Mar 2015, 02:37 PM
Hi Eric,
     I'm using fiddler4 with selenium(chrome web driver).Fiddler failed to capture traffic of the chrome browser opened by selenium web driver,then i have manually opened chrome browser fiddler successfully captured the traffic.

Regards,
Avinash.

2 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 10 Mar 2015, 08:47 PM
You need to configure your Selenium/ChromeDriver instance to proxy its traffic to Fiddler, which runs at 127.0.0.1:8888

http://stackoverflow.com/questions/19225507/how-to-set-proxy-setting-for-chrome-in-selenium-java

suggests you use:

 DesiredCapabilities capabilities = DesiredCapabilities.chrome();
 capabilities
.setCapability("chrome.switches", Arrays.asList("--proxy-server=127.0.0.1:8888"));

 WebDriver driver = new ChromeDriver(capabilities);

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Azhar
Top achievements
Rank 1
answered on 08 Mar 2018, 08:19 AM

Is the problem the same as with Charles Proxy? Charles Proxy doesn't capture traffic to localhost (sometimes) so in theory, changing the "localhost" request to this url is a solution: localhost.charlesproxy.com

I don't think userdata properties allow a change in Sahi so that it can point to localhost.charlesproxy.com. I couldn't find a solution, but all I needed was errors from the console log, so this was my solution: I added this to my chrome flags:
--enable-logging --log-level=0

Visit here! https://goo.gl/Mkynqj

Tags
FiddlerCore
Asked by
Avinash
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Azhar
Top achievements
Rank 1
Share this question
or