selenium-webdriver 4.19.0 → 4.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +21 -0
- package/README.md +1 -1
- package/bidi/addInterceptParameters.js +28 -2
- package/bidi/browser.js +17 -0
- package/bidi/browsingContext.js +206 -39
- package/bidi/browsingContextInspector.js +51 -0
- package/bidi/browsingContextTypes.js +31 -0
- package/bidi/captureScreenshotParameters.js +96 -0
- package/bidi/clipRectangle.js +127 -0
- package/bidi/continueRequestParameters.js +39 -0
- package/bidi/continueResponseParameters.js +40 -0
- package/bidi/cookieFilter.js +60 -0
- package/bidi/createContextParameters.js +73 -0
- package/bidi/evaluateResult.js +17 -0
- package/bidi/index.js +0 -1
- package/bidi/input.js +27 -3
- package/bidi/interceptPhase.js +4 -0
- package/bidi/logEntries.js +66 -0
- package/bidi/network.js +102 -0
- package/bidi/networkTypes.js +346 -1
- package/bidi/partialCookie.js +48 -0
- package/bidi/partitionDescriptor.js +33 -0
- package/bidi/partitionKey.js +17 -0
- package/bidi/protocolType.js +20 -0
- package/bidi/protocolValue.js +129 -2
- package/bidi/provideResponseParameters.js +40 -0
- package/bidi/realmInfo.js +27 -0
- package/bidi/resultOwnership.js +4 -0
- package/bidi/scriptManager.js +119 -1
- package/bidi/scriptTypes.js +36 -0
- package/bidi/storage.js +30 -0
- package/bidi/urlPattern.js +35 -0
- package/bin/linux/selenium-manager +0 -0
- package/bin/macos/selenium-manager +0 -0
- package/bin/windows/selenium-manager.exe +0 -0
- package/chromium.js +12 -9
- package/common/driverFinder.js +36 -4
- package/common/seleniumManager.js +7 -39
- package/eslint.config.js +107 -0
- package/firefox.js +20 -6
- package/http/index.js +6 -6
- package/ie.js +8 -4
- package/index.js +11 -0
- package/io/exec.js +1 -1
- package/io/index.js +3 -2
- package/io/zip.js +1 -1
- package/lib/atoms/find-elements.js +2 -2
- package/lib/http.js +5 -4
- package/lib/input.js +0 -1
- package/lib/pinnedScript.js +1 -1
- package/lib/select.js +102 -60
- package/lib/until.js +3 -3
- package/lib/util.js +1 -0
- package/lib/webdriver.js +2 -2
- package/net/index.js +1 -1
- package/net/portprober.js +1 -1
- package/package.json +13 -7
- package/remote/index.js +1 -1
- package/remote/util.js +2 -2
- package/safari.js +3 -3
- package/testing/index.js +12 -8
package/lib/webdriver.js
CHANGED
|
@@ -32,9 +32,9 @@ const Symbols = require('./symbols')
|
|
|
32
32
|
const cdp = require('../devtools/CDPConnection')
|
|
33
33
|
const WebSocket = require('ws')
|
|
34
34
|
const http = require('../http/index')
|
|
35
|
-
const fs = require('fs')
|
|
35
|
+
const fs = require('node:fs')
|
|
36
36
|
const { Capabilities } = require('./capabilities')
|
|
37
|
-
const path = require('path')
|
|
37
|
+
const path = require('node:path')
|
|
38
38
|
const { NoSuchElementError } = require('./error')
|
|
39
39
|
const cdpTargets = ['page', 'browser']
|
|
40
40
|
const { Credential } = require('./virtual_authenticator')
|
package/net/index.js
CHANGED
package/net/portprober.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "selenium-webdriver",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.21.0",
|
|
4
4
|
"description": "The official WebDriver JavaScript bindings from the Selenium project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/SeleniumHQ/selenium.git"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">= 14.
|
|
23
|
+
"node": ">= 14.21.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"jszip": "^3.10.1",
|
|
@@ -29,13 +29,16 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@bazel/runfiles": "^5.8.1",
|
|
32
|
-
"eslint": "^
|
|
32
|
+
"@eslint/js": "^9.1.1",
|
|
33
|
+
"eslint": "^9.1.0",
|
|
33
34
|
"eslint-config-prettier": "^9.1.0",
|
|
35
|
+
"eslint-plugin-mocha": "^10.4.3",
|
|
36
|
+
"eslint-plugin-n": "^17.2.1",
|
|
34
37
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
35
|
-
"eslint-plugin-node": "^11.1.0",
|
|
36
38
|
"eslint-plugin-prettier": "^5.1.3",
|
|
37
39
|
"express": "^4.19.2",
|
|
38
|
-
"
|
|
40
|
+
"globals": "^15.0.0",
|
|
41
|
+
"mocha": "^10.4.0",
|
|
39
42
|
"mocha-junit-reporter": "^2.2.1",
|
|
40
43
|
"multer": "^1.4.5-lts.1",
|
|
41
44
|
"prettier": "^3.2.5",
|
|
@@ -43,13 +46,16 @@
|
|
|
43
46
|
"sinon": "^17.0.1"
|
|
44
47
|
},
|
|
45
48
|
"scripts": {
|
|
46
|
-
"lint": "eslint
|
|
47
|
-
"lint:fix": "eslint
|
|
49
|
+
"lint": "eslint .",
|
|
50
|
+
"lint:fix": "eslint . --fix",
|
|
48
51
|
"test": "npm run lint && mocha -t 600000 --recursive test",
|
|
49
52
|
"test-jasmine": "bazel test //javascript/node/selenium-webdriver:tests"
|
|
50
53
|
},
|
|
51
54
|
"mocha": {
|
|
52
55
|
"recursive": true,
|
|
53
56
|
"timeout": 600000
|
|
57
|
+
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"registry": "https://registry.npmjs.org/"
|
|
54
60
|
}
|
|
55
61
|
}
|
package/remote/index.js
CHANGED
package/remote/util.js
CHANGED
package/safari.js
CHANGED
|
@@ -25,10 +25,10 @@ const http = require('./http')
|
|
|
25
25
|
const remote = require('./remote')
|
|
26
26
|
const webdriver = require('./lib/webdriver')
|
|
27
27
|
const { Browser, Capabilities } = require('./lib/capabilities')
|
|
28
|
-
const {
|
|
28
|
+
const { getBinaryPaths } = require('./common/driverFinder')
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Creates {@link
|
|
31
|
+
* Creates {@link remote.DriverService} instances that manage
|
|
32
32
|
* a [safaridriver] server in a child process.
|
|
33
33
|
*
|
|
34
34
|
* [safaridriver]: https://developer.apple.com/library/prerelease/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html#//apple_ref/doc/uid/TP40014305-CH11-DontLinkElementID_28
|
|
@@ -123,7 +123,7 @@ class Driver extends webdriver.WebDriver {
|
|
|
123
123
|
|
|
124
124
|
let service = new ServiceBuilder(exe).build()
|
|
125
125
|
if (!service.getExecutable()) {
|
|
126
|
-
service.setExecutable(
|
|
126
|
+
service.setExecutable(getBinaryPaths(caps).driverPath)
|
|
127
127
|
}
|
|
128
128
|
let executor = new http.Executor(service.start().then((url) => new http.HttpClient(url)))
|
|
129
129
|
|
package/testing/index.js
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
'use strict'
|
|
34
34
|
|
|
35
|
-
const { isatty } = require('tty')
|
|
35
|
+
const { isatty } = require('node:tty')
|
|
36
36
|
const chrome = require('../chrome')
|
|
37
37
|
const edge = require('../edge')
|
|
38
38
|
const firefox = require('../firefox')
|
|
@@ -41,7 +41,7 @@ const remote = require('../remote')
|
|
|
41
41
|
const safari = require('../safari')
|
|
42
42
|
const { Browser } = require('../lib/capabilities')
|
|
43
43
|
const { Builder } = require('../index')
|
|
44
|
-
const {
|
|
44
|
+
const { getBinaryPaths } = require('../common/driverFinder')
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Describes a browser targeted by a {@linkplain suite test suite}.
|
|
@@ -122,15 +122,15 @@ function getAvailableBrowsers() {
|
|
|
122
122
|
info(`Searching for WebDriver executables installed on the current system...`)
|
|
123
123
|
|
|
124
124
|
let targets = [
|
|
125
|
-
[
|
|
126
|
-
[
|
|
127
|
-
[
|
|
125
|
+
[getBinaryPaths(new chrome.Options()), Browser.CHROME],
|
|
126
|
+
[getBinaryPaths(new edge.Options()), Browser.EDGE],
|
|
127
|
+
[getBinaryPaths(new firefox.Options()), Browser.FIREFOX],
|
|
128
128
|
]
|
|
129
129
|
if (process.platform === 'win32') {
|
|
130
|
-
targets.push([
|
|
130
|
+
targets.push([getBinaryPaths(new ie.Options()), Browser.INTERNET_EXPLORER])
|
|
131
131
|
}
|
|
132
132
|
if (process.platform === 'darwin') {
|
|
133
|
-
targets.push([
|
|
133
|
+
targets.push([getBinaryPaths(new safari.Options()), Browser.SAFARI])
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
let availableBrowsers = []
|
|
@@ -302,6 +302,11 @@ class Environment {
|
|
|
302
302
|
builder.setCapability('moz:debuggerAddress', true)
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
+
// Enable BiDi for supporting browsers.
|
|
306
|
+
if (browser.name === Browser.FIREFOX || browser.name === Browser.CHROME || browser.name === Browser.EDGE) {
|
|
307
|
+
builder.setCapability('webSocketUrl', true)
|
|
308
|
+
}
|
|
309
|
+
|
|
305
310
|
if (typeof urlOrServer === 'string') {
|
|
306
311
|
builder.usingServer(urlOrServer)
|
|
307
312
|
} else if (urlOrServer) {
|
|
@@ -401,7 +406,6 @@ function suite(fn, options = undefined) {
|
|
|
401
406
|
|
|
402
407
|
const startTimeout = 65 * 1000
|
|
403
408
|
|
|
404
|
-
// eslint-disable-next-line no-inner-declarations
|
|
405
409
|
function startSelenium() {
|
|
406
410
|
if (typeof this.timeout === 'function') {
|
|
407
411
|
this.timeout(startTimeout) // For mocha.
|