I'm interested in debugging my browser session and I found that it is possible to save HTTP requests with their answers to a file using captureNetworkTraffic in json format.

But I can't find any doc or working samples to do so. The only thing I found that selenium.selenium is a part v.1 API, in the current version (v.2) I should use webdriver. webdriver API doesn't have captureNetworkTraffic option or something like this.

I've found a java sample but it is too old (maybe v.1 used) and it requires to run some server. Another one sample doesn't work for me - I receive error: [Errno 111] Connection refused and I don't understand it. What selenium should be connected to on localhost:4444? The server mentioned in the first sample?

I've tried to do a hack driver.execute("captureNetworkTraffic", {"type":"json"}), but it doesn't work either. Also I can't find a string captureNetworkTraffic in chromedriver's sources.

So, is it possible to dump requests and responses without using proxy?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.