Expose the page response headers to Navigator object to make them available from Selenium and other web driversThis is a technical extension to be used with web drivers like Selenium. It adds the so-needed functionality like providing response headers and response status code for requested urls. The available items go to Navigator object, under following properties:
navigator.requestHeaders = <array>;
navigator.requestUrl = <string>;
navigator.requestMethod = <string>;
navigator.responseHeaders = <array>;
navigator.responseStatusCode = <string>;
navigator.responseStatusLine = <string>;
navigator.responseUrl = <string>;
navigator.responseMethod = <string>;
To get those values, you typically need to get them by running a javascript in a page context, and returning the result. In Selenium, it would look something like this:
var builder = new selenium.Builder().withCapabilities(selenium.Capabilities.chrome());
var options = new selenium_chrome.Options();
options.addExtensions(__dirname + "/response-headers.crx");
builder.setChromeOptions(options);
var page = builder.build();
page.then(function() {
// load your url here
}, function(err) {
// error creating browser
});
/// then somewhere after loading the url, you would do
page.executeScript(function() {
return {
statusCode: navigator.responseStatusCode
}
}).then(function(obj) {
// now you have obj.statusCode
});
Gist example: https://gist.github.com/javascriptlove/4a00c4931c4c83287f4efd6c23fd02ed
Why Download Expose Response Headers?
- ✅ Trusted by 14+ users worldwide
- ✅ High Rating: /5 stars from reviews
- ✅ Latest Version: 1.0.1 - Always up to date
- ✅ Safe & Secure: Verified by Chrome Web Store
- ✅ Free to Use: No cost required
Extension Details
Type: Extension
Category: Chrome Browser Extension
Compatibility: Google Chrome Browser
Last Updated: April 29, 2021
Developer: Chrome Web Store Verified
Discover Expose Response Headers - The Best Chrome Extension for Your Browser
Looking for the perfect Chrome extension to enhance your browsing experience? Expose Response Headers is one of the most popular and highly-rated extensions available on the Chrome Web Store, trusted by over 14 users worldwide.
With an impressive -star rating based on authentic user reviews, Expose Response Headers has proven its value and reliability to the Chrome community. This extension is perfect for users who want to improve their productivity, enhance their browsing security, or simply add useful functionality to their Chrome browser.
Download Expose Response Headers today and join thousands of satisfied users who have already discovered the benefits of this powerful Chrome extension. Installation is quick and easy - simply click the download button above to be redirected to the official Chrome Web Store where you can safely install this extension in just a few clicks.