Socket
Socket
Sign inDemoInstall

selenium-webdriver

Package Overview
Dependencies
Maintainers
7
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selenium-webdriver - npm Package Compare versions

Comparing version 4.2.0 to 4.3.0

lib/virtual_authenticator.js

8

CHANGES.md

@@ -0,1 +1,9 @@

## v4.3.0
* Fix: using fulfillRequest when intercepting (#10764)
* Add support CDP 103 and remove CDP 100
* Remove unused param in input.js & minor code cleanup
* Fixes lint issues and updates npm packages
* feat: Added virtual authenticator (#10663)
## v4.2.0

@@ -2,0 +10,0 @@

5

chrome.js

@@ -293,7 +293,6 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

Options,
ServiceBuilder ,
ServiceBuilder,
getDefaultService,
setDefaultService,
locateSynchronously
locateSynchronously,
}

2

chromium.js

@@ -863,3 +863,3 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

*/
startDesktopMirroring(deviceName) {
startDesktopMirroring(deviceName) {
return this.schedule(

@@ -866,0 +866,0 @@ new command.Command(Command.START_CAST_DESKTOP_MIRRORING).setParameter(

@@ -22,3 +22,3 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

this.cmd_id = 0
this.targetID = null;
this.targetID = null
this.sessionId = null

@@ -25,0 +25,0 @@ }

@@ -675,3 +675,3 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

let stats = fs.statSync(path)
let buf;
let buf
if (stats.isDirectory()) {

@@ -678,0 +678,0 @@ let zip = new Zip()

@@ -405,5 +405,5 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

`${IEDRIVER_EXE} could not be found on the current PATH. Please ` +
`download the latest version of ${IEDRIVER_EXE} from ` +
'https://www.selenium.dev/downloads/ and ' +
'ensure it can be found on your system PATH.'
`download the latest version of ${IEDRIVER_EXE} from ` +
'https://www.selenium.dev/downloads/ and ' +
'ensure it can be found on your system PATH.'
)

@@ -410,0 +410,0 @@ }

@@ -80,3 +80,3 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

/** @param {input.FileDetector} detector */
setFileDetector (detector) {
setFileDetector(detector) {
webdriver.WebDriver.prototype.setFileDetector.call(this, detector)

@@ -83,0 +83,0 @@ }

@@ -167,2 +167,11 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

// Virtual Authenticator Commands
ADD_VIRTUAL_AUTHENTICATOR: 'addVirtualAuthenticator',
REMOVE_VIRTUAL_AUTHENTICATOR: 'removeVirtualAuthenticator',
ADD_CREDENTIAL: 'addCredential',
GET_CREDENTIALS: 'getCredentials',
REMOVE_CREDENTIAL: 'removeCredential',
REMOVE_ALL_CREDENTIALS: 'removeAllCredentials',
SET_USER_VERIFIED: 'setUserVerified',
GET_AVAILABLE_LOG_TYPES: 'getAvailableLogTypes',

@@ -169,0 +178,0 @@ GET_LOG: 'getLog',

@@ -350,2 +350,40 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

[cmd.Name.UPLOAD_FILE, post('/session/:sessionId/se/file')],
// Virtual Authenticator
[
cmd.Name.ADD_VIRTUAL_AUTHENTICATOR,
post('/session/:sessionId/webauthn/authenticator'),
],
[
cmd.Name.REMOVE_VIRTUAL_AUTHENTICATOR,
del('/session/:sessionId/webauthn/authenticator/:authenticatorId'),
],
[
cmd.Name.ADD_CREDENTIAL,
post(
'/session/:sessionId/webauthn/authenticator/:authenticatorId/credential'
),
],
[
cmd.Name.GET_CREDENTIALS,
get(
'/session/:sessionId/webauthn/authenticator/:authenticatorId/credentials'
),
],
[
cmd.Name.REMOVE_CREDENTIAL,
del(
'/session/:sessionId/webauthn/authenticator/:authenticatorId/credentials/:credentialId'
),
],
[
cmd.Name.REMOVE_ALL_CREDENTIALS,
del(
'/session/:sessionId/webauthn/authenticator/:authenticatorId/credentials'
),
],
[
cmd.Name.SET_USER_VERIFIED,
post('/session/:sessionId/webauthn/authenticator/:authenticatorId/uv'),
],
])

@@ -476,2 +514,3 @@

let httpResponse = /** @type {!Response} */ (response)
let { isW3C, value } = parseHttpResponse(command, httpResponse)

@@ -535,2 +574,3 @@

let parsed = tryParse(httpResponse.body)
if (parsed && typeof parsed === 'object') {

@@ -537,0 +577,0 @@ let value = parsed.value

@@ -349,12 +349,38 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

* @param {!Button=} button The button to press.
* @param width
* @param height
* @param pressure
* @param tangentialPressure
* @param tiltX
* @param tiltY
* @param twist
* @param altitudeAngle
* @param azimuthAngle
* @return {!Action} An action to press the specified button with this device.
* @package
*/
press(button = Button.LEFT, width = 0, height = 0, pressure = 0,
tangentialPressure = 0, tiltX = 0, tiltY = 0, twist = 0,
altitudeAngle = 0, azimuthAngle = 0) {
press(
button = Button.LEFT,
width = 0,
height = 0,
pressure = 0,
tangentialPressure = 0,
tiltX = 0,
tiltY = 0,
twist = 0,
altitudeAngle = 0,
azimuthAngle = 0
) {
return {
type: Action.Type.POINTER_DOWN, button, width, height,
pressure, tangentialPressure, tiltX, tiltY, twist,
altitudeAngle, azimuthAngle
type: Action.Type.POINTER_DOWN,
button,
width,
height,
pressure,
tangentialPressure,
tiltX,
tiltY,
twist,
altitudeAngle,
azimuthAngle,
}

@@ -389,11 +415,32 @@ }

*/
move({ x = 0, y = 0, duration = 100, origin = Origin.VIEWPORT,
width = 0, height = 0, pressure = 0,
tangentialPressure = 0, tiltX = 0, tiltY = 0, twist = 0,
altitudeAngle = 0, azimuthAngle = 0
move({
x = 0,
y = 0,
duration = 100,
origin = Origin.VIEWPORT,
width = 0,
height = 0,
pressure = 0,
tangentialPressure = 0,
tiltX = 0,
tiltY = 0,
twist = 0,
altitudeAngle = 0,
azimuthAngle = 0,
}) {
return {
type: Action.Type.POINTER_MOVE, origin, duration, x, y,
width, height, pressure, tangentialPressure, tiltX, tiltY, twist,
altitudeAngle, azimuthAngle
type: Action.Type.POINTER_MOVE,
origin,
duration,
x,
y,
width,
height,
pressure,
tangentialPressure,
tiltX,
tiltY,
twist,
altitudeAngle,
azimuthAngle,
}

@@ -415,6 +462,5 @@ }

/**
* @param {string} id the device ID.
* @param {Pointer.Type} type the pointer type.
* @param {string} id the device ID..
*/
constructor(id, type) {
constructor(id) {
super(Device.Type.WHEEL, id)

@@ -429,2 +475,3 @@ }

* @param {number} deltaY Delta Y to scroll to target
* @param {WebElement} origin element origin
* @param {number} duration duration ratio be the ratio of time delta and duration

@@ -436,5 +483,8 @@ * @returns {!Action} An action to scroll with this device.

type: Action.Type.SCROLL,
duration: duration, x: x, y: y,
deltaX: deltaX, deltaY: deltaY,
origin: origin
duration: duration,
x: x,
y: y,
deltaX: deltaX,
deltaY: deltaY,
origin: origin,
}

@@ -803,6 +853,9 @@ }

* @param {number} duration duration ratio be the ratio of time delta and duration
* @returns {!Action} An action to scroll with this device.
* @returns {!Actions} An action to scroll with this device.
*/
scroll(x, y, targetDeltaX, targetDeltaY, origin, duration) {
return this.insert(this.wheel_, this.wheel_.scroll(x, y, targetDeltaX, targetDeltaY, origin, duration))
return this.insert(
this.wheel_,
this.wheel_.scroll(x, y, targetDeltaX, targetDeltaY, origin, duration)
)
}

@@ -809,0 +862,0 @@

@@ -51,3 +51,6 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

for (let ipAddress of interfaces[key]) {
if ((ipAddress.family === family || `IPv${ipAddress.family}` === family) && ipAddress.internal === loopback) {
if (
(ipAddress.family === family || `IPv${ipAddress.family}` === family) &&
ipAddress.internal === loopback
) {
return ipAddress.address

@@ -77,3 +80,7 @@ }

function getLoopbackAddress(family = 'IPv4') {
return getIPAddress(true, family)
let address = getIPAddress(true, family)
if (address === '127.0.0.1') {
address = 'localhost'
}
return address
}

@@ -80,0 +87,0 @@

{
"name": "selenium-webdriver",
"version": "4.2.0",
"version": "4.3.0",
"description": "The official WebDriver JavaScript bindings from the Selenium project",

@@ -26,17 +26,17 @@ "license": "Apache-2.0",

"dependencies": {
"jszip": "^3.6.0",
"jszip": "^3.10.0",
"tmp": "^0.2.1",
"ws": ">=7.4.6"
"ws": ">=8.7.0"
},
"devDependencies": {
"eslint": "^7.26.0",
"eslint-config-prettier": "^8.3.0",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-prettier": "^4.0.0",
"express": "^4.17.1",
"jasmine": "^3.8.0",
"mocha": "^9.2.2",
"multer": "^1.4.2",
"prettier": "^2.3.0",
"mocha": "^10.0.0",
"multer": "^1.4.5-lts.1",
"prettier": "^2.6.1",
"serve-index": "^1.9.1",

@@ -46,3 +46,3 @@ "sinon": "^10.0.0"

"scripts": {
"lint": "eslint --ignore-pattern node_modules --ignore-pattern generator --ext js lib/http.js \"**/*.js\"",
"lint": "eslint --ignore-pattern node_modules --ignore-pattern generator --fix --ext js lib/http.js \"**/*.js\"",
"test": "npm run lint && mocha -t 600000 --recursive test",

@@ -49,0 +49,0 @@ "test-jasmine": "jasmine JASMINE_CONFIG_PATH=jasmine.json"

@@ -42,3 +42,3 @@ // Licensed to the Software Freedom Conservancy (SFC) under one

const safari = require('../safari')
const { Browser, Capabilities } = require('../lib/capabilities')
const { Browser } = require('../lib/capabilities')
const { Builder } = require('../index')

@@ -50,3 +50,3 @@

*/
function TargetBrowser() { }
function TargetBrowser() {}

@@ -213,3 +213,3 @@ /**

'Ambiguous test configuration: both SELENIUM_REMOTE_URL' +
' && SELENIUM_SERVER_JAR environment variables are set'
' && SELENIUM_SERVER_JAR environment variables are set'
)

@@ -222,4 +222,4 @@ }

'Ambiguous test configuration: when either the SELENIUM_REMOTE_URL or' +
' SELENIUM_SERVER_JAR environment variable is set, the' +
' SELENIUM_BROWSER variable must also be set.'
' SELENIUM_SERVER_JAR environment variable is set, the' +
' SELENIUM_BROWSER variable must also be set.'
)

@@ -241,3 +241,4 @@ }

const TARGET_MAP = /** !WeakMap<!Environment, !TargetBrowser> */ new WeakMap()
const URL_MAP = /** !WeakMap<!Environment, ?(string|remote.SeleniumServer)> */ new WeakMap()
const URL_MAP =
/** !WeakMap<!Environment, ?(string|remote.SeleniumServer)> */ new WeakMap()

@@ -255,5 +256,5 @@ /**

constructor(browser, url = undefined) {
browser = /** @type {!TargetBrowser} */ (Object.seal(
Object.assign({}, browser)
))
browser = /** @type {!TargetBrowser} */ (
Object.seal(Object.assign({}, browser))
)

@@ -293,15 +294,12 @@ TARGET_MAP.set(this, browser)

const realBuild = builder.build
builder.build = function () {
builder.forBrowser(browser.name, browser.version, browser.platform);
builder.forBrowser(browser.name, browser.version, browser.platform)
if (browser.capabilities) {
builder.getCapabilities().merge(browser.capabilities);
builder.getCapabilities().merge(browser.capabilities)
}
if (browser.name === 'firefox') {
builder.setCapability('moz:debuggerAddress', true);
builder.setCapability('moz:debuggerAddress', true)
}

@@ -325,3 +323,3 @@

*/
function SuiteOptions() { }
function SuiteOptions() {}

@@ -453,3 +451,3 @@ /**

* @return {{describe: !Function, it: !Function}} an object with wrapped
* versions of the `describe` and `it` wtest functions.
* versions of the `describe` and `it` test functions.
*/

@@ -502,4 +500,4 @@ function ignore(predicateFn) {

`Expected global.${name} to be a function, but is ${type}.` +
' This can happen if you try using this module when running with' +
' node directly instead of using jasmine or mocha'
' This can happen if you try using this module when running with' +
' node directly instead of using jasmine or mocha'
)

@@ -506,0 +504,0 @@ }

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc