I need the best way to inspect HTTP response headers with Selenium. I looked around the Selenium docs and didn't see any straightforward way to do it. Help is highly appreciated.
captureNetworkTraffic() API in DefaultSelenium captures http request/response headers and you can access them in html/xml/plain format.
Here is sample code:
Selenium s = new DefaultSelenium(...);
s.start("captureNetworkTraffic=true");
s.open("http://www.google.com");
String xml = s.captureNetworkTraffic("xml"); // html, plain
s.stop();