selenium-webdriver
Advanced tools
Comparing version 2.30.0 to 2.31.0
90
_base.js
@@ -37,2 +37,13 @@ // Copyright 2012 Selenium committers | ||
/** | ||
* If this script was loaded from the Selenium project repo, it will operate in | ||
* development, adjusting how it loads Closure-based dependencies. | ||
* @type {boolean} | ||
*/ | ||
var devMode = (function() { | ||
var buildDescFile = path.join(__dirname, '..', 'build.desc'); | ||
return fs.existsSync(buildDescFile); | ||
})(); | ||
/** | ||
* @type {string} Path to Closure's base file, relative to this module. | ||
@@ -78,7 +89,2 @@ * @const | ||
if (isDevMode()) { | ||
exports.closure = closure; | ||
} | ||
/** | ||
@@ -94,32 +100,4 @@ * Loads a symbol by name from the protected Closure context. | ||
}; | ||
exports.require = closureRequire; | ||
/** | ||
* Loads a symbol by name from the protected Closure context and exports its | ||
* public API to the provided object. This function relies on Closure code | ||
* conventions to define the public API of an object as those properties whose | ||
* name does not end with "_". | ||
* @param {string} symbol The symbol to load. This must resolve to an object. | ||
* @return {!Object} An object with the exported API. | ||
* @throws {Error} If the symbol has not been defined or does not resolve to | ||
* an object. | ||
*/ | ||
exports.exportPublicApi = function(symbol) { | ||
var src = closureRequire(symbol); | ||
if (typeof src != 'object' || src === null) { | ||
throw Error('"' + symbol + '" must resolve to an object'); | ||
} | ||
var dest = {}; | ||
Object.keys(src).forEach(function(key) { | ||
if (key[key.length - 1] != '_') { | ||
dest[key] = src[key]; | ||
} | ||
}); | ||
return dest; | ||
}; | ||
/** @return {string} Path to the closure library's base script. */ | ||
@@ -143,11 +121,7 @@ function computeClosureBasePath() { | ||
/** | ||
* Checks for the SELENIUM_DEV_MODE environment variable. If set, scripts | ||
* will be loaded relative to this script's location in the Selenium project's | ||
* repository. | ||
* @return {boolean} Whether this script was loaded in dev mode. | ||
*/ | ||
/** @return {boolean} Whether this script was loaded in dev mode. */ | ||
function isDevMode() { | ||
return process.env['SELENIUM_DEV_MODE'] === '1'; | ||
return devMode; | ||
} | ||
exports.isDevMode = isDevMode; | ||
@@ -165,1 +139,37 @@ | ||
// PUBLIC API | ||
/** | ||
* Loads a symbol by name from the protected Closure context and exports its | ||
* public API to the provided object. This function relies on Closure code | ||
* conventions to define the public API of an object as those properties whose | ||
* name does not end with "_". | ||
* @param {string} symbol The symbol to load. This must resolve to an object. | ||
* @return {!Object} An object with the exported API. | ||
* @throws {Error} If the symbol has not been defined or does not resolve to | ||
* an object. | ||
*/ | ||
exports.exportPublicApi = function(symbol) { | ||
var src = closureRequire(symbol); | ||
if (typeof src != 'object' || src === null) { | ||
throw Error('"' + symbol + '" must resolve to an object'); | ||
} | ||
var dest = {}; | ||
Object.keys(src).forEach(function(key) { | ||
if (key[key.length - 1] != '_') { | ||
dest[key] = src[key]; | ||
} | ||
}); | ||
return dest; | ||
}; | ||
if (isDevMode()) { | ||
exports.closure = closure; | ||
} | ||
exports.isDevMode = isDevMode; | ||
exports.require = closureRequire; |
10
index.js
@@ -24,3 +24,3 @@ // Copyright 2012 Selenium committers | ||
exports.ActionSequence = base.require('webdriver.ActionSequence'); | ||
exports.Builder = base.require('node.Builder'); | ||
exports.Builder = require('./builder').Builder; | ||
exports.Button = base.require('webdriver.Button'); | ||
@@ -52,9 +52,3 @@ exports.By = base.require('webdriver.Locator.Strategy'); | ||
}, | ||
http: { | ||
Executor: base.require('webdriver.http.Executor'), | ||
Request: base.require('webdriver.http.Request'), | ||
Response: base.require('webdriver.http.Response'), | ||
HttpClient: base.require('node.http.HttpClient'), | ||
util: base.require('node.http.util') | ||
}, | ||
http: require('./http'), | ||
promise: base.exportPublicApi('webdriver.promise'), | ||
@@ -61,0 +55,0 @@ stacktrace: base.exportPublicApi('webdriver.stacktrace') |
// This file has been auto-generated; do not edit by hand | ||
goog.addDependency("../webdriver/actionsequence.js", ["webdriver.ActionSequence"], ["goog.array","webdriver.Button","webdriver.Command","webdriver.CommandName","webdriver.Key"]); | ||
goog.addDependency("array/array.js", ["goog.array","goog.array.ArrayLike"], ["goog.asserts"]); | ||
goog.addDependency("asserts/asserts.js", ["goog.asserts","goog.asserts.AssertionError"], ["goog.debug.Error","goog.string"]); | ||
goog.addDependency("debug/error.js", ["goog.debug.Error"], []); | ||
goog.addDependency("object/object.js", ["goog.object"], []); | ||
goog.addDependency("../atoms/error.js", ["bot.Error","bot.ErrorCode"], ["goog.object"]); | ||
goog.addDependency("../atoms/userAgent.js", ["bot.userAgent"], ["goog.string","goog.userAgent","goog.userAgent.product","goog.userAgent.product.isVersion"]); | ||
goog.addDependency("string/string.js", ["goog.string","goog.string.Unicode"], []); | ||
goog.addDependency("../webdriver/button.js", ["webdriver.Button"], []); | ||
goog.addDependency("../webdriver/command.js", ["webdriver.Command","webdriver.CommandExecutor","webdriver.CommandName"], []); | ||
goog.addDependency("../webdriver/key.js", ["webdriver.Key"], []); | ||
goog.addDependency("../node/builder.js", ["node.Builder"], ["node.http.HttpClient","webdriver.AbstractBuilder","webdriver.WebDriver","webdriver.http.Executor"]); | ||
goog.addDependency("../node/http/http.js", ["node.http","node.http.HttpClient"], ["webdriver.http.Response"]); | ||
goog.addDependency("../webdriver/http/http.js", ["webdriver.http.Client","webdriver.http.Executor","webdriver.http.Request","webdriver.http.Response"], ["bot.ErrorCode","goog.array","goog.json","webdriver.CommandName","webdriver.promise.Deferred"]); | ||
goog.addDependency("../atoms/error.js", ["bot.Error","bot.ErrorCode"], ["goog.object"]); | ||
goog.addDependency("object/object.js", ["goog.object"], []); | ||
goog.addDependency("useragent/useragent.js", ["goog.userAgent"], ["goog.string"]); | ||
goog.addDependency("useragent/product.js", ["goog.userAgent.product"], ["goog.userAgent"]); | ||
goog.addDependency("useragent/product_isversion.js", ["goog.userAgent.product.isVersion"], ["goog.userAgent.product"]); | ||
goog.addDependency("json/json.js", ["goog.json","goog.json.Serializer"], []); | ||
goog.addDependency("../webdriver/promise.js", ["webdriver.promise","webdriver.promise.ControlFlow","webdriver.promise.Deferred","webdriver.promise.Promise"], ["goog.array","goog.object","webdriver.EventEmitter","webdriver.stacktrace.Snapshot"]); | ||
goog.addDependency("../webdriver/events.js", ["webdriver.EventEmitter"], []); | ||
goog.addDependency("../webdriver/stacktrace.js", ["webdriver.stacktrace","webdriver.stacktrace.Snapshot"], ["goog.array","goog.string"]); | ||
goog.addDependency("../webdriver/abstractbuilder.js", ["webdriver.AbstractBuilder"], ["webdriver.process"]); | ||
goog.addDependency("../webdriver/process.js", ["webdriver.process"], ["goog.Uri","goog.array","goog.json"]); | ||
goog.addDependency("uri/uri.js", ["goog.Uri","goog.Uri.QueryData"], ["goog.array","goog.string","goog.structs","goog.structs.Map","goog.uri.utils","goog.uri.utils.ComponentIndex"]); | ||
goog.addDependency("array/array.js", ["goog.array","goog.array.ArrayLike"], ["goog.asserts"]); | ||
goog.addDependency("asserts/asserts.js", ["goog.asserts","goog.asserts.AssertionError"], ["goog.debug.Error","goog.string"]); | ||
goog.addDependency("debug/error.js", ["goog.debug.Error"], []); | ||
goog.addDependency("structs/structs.js", ["goog.structs"], ["goog.array","goog.object"]); | ||
@@ -26,11 +19,20 @@ goog.addDependency("structs/map.js", ["goog.structs.Map"], ["goog.iter.Iterator","goog.iter.StopIteration","goog.object","goog.structs"]); | ||
goog.addDependency("uri/utils.js", ["goog.uri.utils","goog.uri.utils.ComponentIndex","goog.uri.utils.QueryArray","goog.uri.utils.QueryValue","goog.uri.utils.StandardQueryParam"], ["goog.asserts","goog.string","goog.userAgent"]); | ||
goog.addDependency("useragent/useragent.js", ["goog.userAgent"], ["goog.string"]); | ||
goog.addDependency("../webdriver/button.js", ["webdriver.Button"], []); | ||
goog.addDependency("../webdriver/command.js", ["webdriver.Command","webdriver.CommandExecutor","webdriver.CommandName"], []); | ||
goog.addDependency("../webdriver/key.js", ["webdriver.Key"], []); | ||
goog.addDependency("../webdriver/abstractbuilder.js", ["webdriver.AbstractBuilder"], ["webdriver.process"]); | ||
goog.addDependency("../webdriver/firefoxdomexecutor.js", ["webdriver.FirefoxDomExecutor"], ["bot.response","goog.json","goog.userAgent.product","webdriver.Command","webdriver.CommandName"]); | ||
goog.addDependency("../atoms/response.js", ["bot.response","bot.response.ResponseObject"], ["bot.Error","bot.ErrorCode"]); | ||
goog.addDependency("../webdriver/webdriver.js", ["webdriver.Alert","webdriver.UnhandledAlertError","webdriver.WebDriver","webdriver.WebElement"], ["bot.Error","bot.ErrorCode","bot.response","goog.array","goog.object","webdriver.ActionSequence","webdriver.Command","webdriver.CommandName","webdriver.Key","webdriver.Locator","webdriver.Session","webdriver.promise"]); | ||
goog.addDependency("../atoms/response.js", ["bot.response","bot.response.ResponseObject"], ["bot.Error","bot.ErrorCode"]); | ||
goog.addDependency("../webdriver/actionsequence.js", ["webdriver.ActionSequence"], ["goog.array","webdriver.Button","webdriver.Command","webdriver.CommandName","webdriver.Key"]); | ||
goog.addDependency("../webdriver/locators.js", ["webdriver.Locator","webdriver.Locator.Strategy"], ["bot.json","goog.object"]); | ||
goog.addDependency("../atoms/json.js", ["bot.json"], ["bot.userAgent","goog.json","goog.userAgent"]); | ||
goog.addDependency("../atoms/userAgent.js", ["bot.userAgent"], ["goog.string","goog.userAgent","goog.userAgent.product","goog.userAgent.product.isVersion"]); | ||
goog.addDependency("useragent/product.js", ["goog.userAgent.product"], ["goog.userAgent"]); | ||
goog.addDependency("useragent/product_isversion.js", ["goog.userAgent.product.isVersion"], ["goog.userAgent.product"]); | ||
goog.addDependency("../webdriver/session.js", ["webdriver.Session"], []); | ||
goog.addDependency("../node/http/util.js", ["node.http.util"], ["bot.response","node.http.HttpClient","webdriver.http.Executor","webdriver.http.Request","webdriver.Command","webdriver.CommandName","webdriver.promise"]); | ||
goog.addDependency("../webdriver/promise.js", ["webdriver.promise","webdriver.promise.ControlFlow","webdriver.promise.Deferred","webdriver.promise.Promise"], ["goog.array","goog.object","webdriver.EventEmitter","webdriver.stacktrace.Snapshot"]); | ||
goog.addDependency("../webdriver/events.js", ["webdriver.EventEmitter"], []); | ||
goog.addDependency("../webdriver/stacktrace.js", ["webdriver.stacktrace","webdriver.stacktrace.Snapshot"], ["goog.array","goog.string"]); | ||
goog.addDependency("../webdriver/http/corsclient.js", ["webdriver.http.CorsClient"], ["goog.json","webdriver.http.Response"]); | ||
goog.addDependency("../webdriver/http/http.js", ["webdriver.http.Client","webdriver.http.Executor","webdriver.http.Request","webdriver.http.Response"], ["bot.ErrorCode","goog.array","goog.json","webdriver.CommandName","webdriver.promise.Deferred"]); | ||
goog.addDependency("net/xmlhttp.js", ["goog.net.DefaultXmlHttpFactory","goog.net.XmlHttp","goog.net.XmlHttp.OptionType","goog.net.XmlHttp.ReadyState"], ["goog.net.WrapperXmlHttpFactory","goog.net.XmlHttpFactory"]); | ||
goog.addDependency("net/wrapperxmlhttpfactory.js", ["goog.net.WrapperXmlHttpFactory"], ["goog.net.XmlHttpFactory"]); | ||
goog.addDependency("net/xmlhttpfactory.js", ["goog.net.XmlHttpFactory"], []); |
{ | ||
"name": "selenium-webdriver", | ||
"version": "2.30.0", | ||
"version": "2.31.0", | ||
"description": "The official WebDriver JavaScript bindings from the Selenium project", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
642761
52
16628
6
4