TestingBot Blog

TestingBot provides a cloud of browsers and devices, ready to run your Automated, Live and Visual tests.

< Back to Blog Overview

Network Traffic inspection with Selenium

2011-12-21

Today we're examining the captureNetworkTraffic selenium command, a little known gem in Selenium's command list.


Selenium offers a feature, captureNetworkTraffic, which allows you to intercept the network traffic as seen by the browser running your test. The response includes headers, status codes, timings and AJAX requests. It's especially useful if you're debugging requests in your browser.


An example on how to use this in ruby:

This will open Google in Firefox 8 and return the network traffic. An example of a response would be:


This command is available on our Grid and can be used to debug requests and calculate how long a request takes.

< Back to Blog Overview

Sign up for a Free Trial

Start testing your apps with TestingBot.

No credit card required.