The best way to inspect HTTP response headers with Selenium [closed]

0
0

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.

  • You must to post comments
0
0

I’ve answered this question a couple times on StackOverflow. Search my previous answers to dig it up. The key that you have to write some custom Java code that extends ProxyHandler and SeleniumServer. You also need to use a release AFTER 1.0 beta 2.

As to the people who ask why you’d want to do this: there are a lot of reasons. In my case, we’re testing an AJAX heavy app and when things go wrong, one of the first things we debug is the network wire. That helps us see if the AJAX call happened and, if so, what the response was. We’re actually automated the collection of this info and capture it (along with a screenshot) with every Selenium test.

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website