How to use the cookiejar.create function in cookiejar

To help you get started, we’ve selected a few cookiejar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ariya / phantomjs / src / ghostdriver / session.js View on Github external
"proxy"                     : typeof(desiredCapabilities.proxy) === "undefined" ?
            _defaultCapabilities.proxy :
            desiredCapabilities.proxy
    },
    // NOTE: This value is needed for Timeouts Upper-bound limit.
    // "setTimeout/setInterval" accept only 32 bit integers, even though Number are all Doubles (go figure!)
    // Interesting details here: {@link http://stackoverflow.com/a/4995054}.
    _max32bitInt = Math.pow(2, 31) -1,      //< Max 32bit Int
    _timeouts = {
        "script"            : _max32bitInt,
        "implicit"          : 200,          //< 200ms
        "page load"         : _max32bitInt,
    },
    _windows = {},  //< NOTE: windows are "webpage" in Phantom-dialect
    _currentWindowHandle = null,
    _cookieJar = require('cookiejar').create(),
    _id = require("./third_party/uuid.js").v1(),
    _inputs = ghostdriver.Inputs(),
    _capsPageSettingsPref = "phantomjs.page.settings.",
    _capsPageCustomHeadersPref = "phantomjs.page.customHeaders.",
    _capsPageSettingsProxyPref = "proxy",
    _pageSettings = {},
    _additionalPageSettings = {
        userName: null,
        password: null
    },
    _pageCustomHeaders = {},
    _log = ghostdriver.logger.create("Session [" + _id + "]"),
    k, settingKey, headerKey, proxySettings;

    var
    /**
github detro / ghostdriver / src / session.js View on Github external
"webSecurityEnabled"        : typeof(desiredCapabilities.webSecurityEnabled) === "undefined" ?
            _defaultCapabilities.webSecurityEnabled :
            desiredCapabilities.webSecurityEnabled
    },
    // NOTE: This value is needed for Timeouts Upper-bound limit.
    // "setTimeout/setInterval" accept only 32 bit integers, even though Number are all Doubles (go figure!)
    // Interesting details here: {@link http://stackoverflow.com/a/4995054}.
    _max32bitInt = Math.pow(2, 31) -1,      //< Max 32bit Int
    _timeouts = {
        "script"            : 30000,
        "implicit"          : 0,
        "page load"         : 300000,
    },
    _windows = {},  //< NOTE: windows are "webpage" in Phantom-dialect
    _currentWindowHandle = null,
    _cookieJar = require('cookiejar').create(),
    _id = require("./third_party/uuid.js").v1(),
    _inputs = ghostdriver.Inputs(),
    _capsPageSettingsPref = "phantomjs.page.settings.",
    _capsPageCustomHeadersPref = "phantomjs.page.customHeaders.",
    _capsPageZoomFactor = "phantomjs.page.zoomFactor",
    _capsPageBlacklistPref = "phantomjs.page.blacklist",
    _capsPageWhitelistPref = "phantomjs.page.whitelist",
    _capsUnhandledPromptBehavior = "unhandledPromptBehavior",
    _capsLoggingPref = "loggingPrefs",
    _capsBrowserLoggerPref = "OFF",
    _capsHarLoggerPref = "OFF",
    _pageBlacklistFilter,
    _pageWhitelistFilter,
    _capsPageSettingsProxyPref = "proxy",
    _pageSettings = {},
    _pageZoomFactor = 1,

cookiejar

simple persistent cookiejar system

MIT
Latest version published 2 years ago

Package Health Score

74 / 100
Full package analysis

Similar packages