Expose Response Headers

Expose the page response headers to Navigator object to make them available from Selenium and other web drivers

Τι είναι το Expose Response Headers;

Το Expose Response Headers είναι ένα πρόσθετο Chrome που αναπτύχθηκε από τον Alexander Kuzmenok, και η κύρια λειτουργία του είναι "Expose the page response headers to Navigator object to make them available from Selenium and other web drivers".

Λήψη αρχείου CRX της επέκτασης Expose Response Headers

Λήψη αρχείων επέκτασης Expose Response Headers σε μορφή crx, εγκατάσταση των επεκτάσεων Chrome μη αυτόματα στον περιηγητή ή κοινοποίηση των αρχείων crx με φίλους για εύκολη εγκατάσταση των επεκτάσεων Chrome.

Οδηγίες Χρήσης της Επέκτασης

                        This 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 = ;
navigator.requestUrl = ;
navigator.requestMethod = ;
navigator.responseHeaders = ;
navigator.responseStatusCode = ;
navigator.responseStatusLine = ;
navigator.responseUrl = ;
navigator.responseMethod = ;

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                    

Βασικές Πληροφορίες Επέκτασης

Όνομα Expose Response Headers Expose Response Headers
ID omlflgllokdkamhdgiaalffaeopelagg
Επίσημο URL https://chromewebstore.google.com/detail/expose-response-headers/omlflgllokdkamhdgiaalffaeopelagg
Περιγραφή Expose the page response headers to Navigator object to make them available from Selenium and other web drivers
Μέγεθος Αρχείου 20.04 KB
Αριθμός Εγκαταστάσεων 17
Τρέχουσα Έκδοση 1.0.1
Τελευταία Ενημέρωση 2017-03-02
Ημερομηνία Δημοσίευσης 2017-03-02
Προγραμματιστής Alexander Kuzmenok
Ηλεκτρονικό ταχυδρομείο [email protected]
Τύπος Πληρωμής free
Υποστηριζόμενες Γλώσσες en
manifest.json
{
    "background": {
        "scripts": [
            "background.js"
        ]
    },
    "content_scripts": [
        {
            "matches": [
                "http:\/\/*\/*",
                "https:\/\/*\/*"
            ],
            "js": [
                "content_script.js"
            ],
            "run_at": "document_start"
        }
    ],
    "description": "Expose the page response headers to Navigator object to make them available from Selenium and other web drivers",
    "icons": {
        "128": "icon128.png"
    },
    "manifest_version": 2,
    "name": "Expose Response Headers",
    "permissions": [
        "webRequest",
        "tabs",
        "http:\/\/*\/*",
        "https:\/\/*\/*"
    ],
    "update_url": "http:\/\/clients2.google.com\/service\/update2\/crx",
    "version": "1.0.1"
}