Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"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
/**
"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,