selenium-webdriver 4.1.0 → 4.1.1
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 +15 -0
- package/LICENSE +1 -1
- package/NOTICE +1 -1
- package/chrome.js +13 -10
- package/chromium.js +32 -6
- package/edge.js +8 -6
- package/example/google_search.js +1 -1
- package/firefox.js +32 -17
- package/index.js +4 -4
- package/io/exec.js +2 -1
- package/io/index.js +23 -21
- package/io/zip.js +1 -3
- package/lib/by.js +5 -5
- package/lib/command.js +1 -11
- package/lib/error.js +1 -20
- package/lib/http.js +62 -158
- package/lib/input.js +1 -1
- package/lib/promise.js +12 -17
- package/lib/proxy.js +15 -5
- package/lib/session.js +1 -1
- package/lib/until.js +14 -16
- package/lib/webdriver.js +95 -101
- package/net/index.js +14 -7
- package/net/portprober.js +4 -3
- package/opera.js +19 -22
- package/package.json +1 -1
- package/remote/index.js +12 -9
- package/safari.js +3 -3
- package/testing/index.js +11 -4
package/remote/index.js
CHANGED
|
@@ -33,12 +33,12 @@ const portprober = require('../net/portprober')
|
|
|
33
33
|
/**
|
|
34
34
|
* @typedef {(string|!Array<string|number|!stream.Stream|null|undefined>)}
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
let StdIoOptions // eslint-disable-line
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @typedef {(string|!IThenable<string>)}
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
let CommandLineFlag // eslint-disable-line
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* A record object that defines the configuration options for a DriverService
|
|
@@ -196,8 +196,8 @@ class DriverService {
|
|
|
196
196
|
return this.address_
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
const timeout = opt_timeoutMs || DriverService.DEFAULT_START_TIMEOUT_MS
|
|
200
|
+
const self = this
|
|
201
201
|
|
|
202
202
|
let resolveCommand
|
|
203
203
|
this.command_ = new Promise((resolve) => (resolveCommand = resolve))
|
|
@@ -567,7 +567,7 @@ SeleniumServer.Options = class {
|
|
|
567
567
|
* When a file path on the local machine running this script is entered with
|
|
568
568
|
* {@link webdriver.WebElement#sendKeys WebElement#sendKeys}, this file detector
|
|
569
569
|
* will transfer the specified file to the Selenium server's host; the sendKeys
|
|
570
|
-
* command will be updated to use the
|
|
570
|
+
* command will be updated to use the transferred file's path.
|
|
571
571
|
*
|
|
572
572
|
* __Note:__ This class depends on a non-standard command supported on the
|
|
573
573
|
* Java Selenium server. The file detector will fail if used with a server that
|
|
@@ -618,7 +618,10 @@ class FileDetector extends input.FileDetector {
|
|
|
618
618
|
|
|
619
619
|
// PUBLIC API
|
|
620
620
|
|
|
621
|
-
exports
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
621
|
+
module.exports = {
|
|
622
|
+
DriverService,
|
|
623
|
+
FileDetector,
|
|
624
|
+
SeleniumServer,
|
|
625
|
+
// Exported for API docs.
|
|
626
|
+
ServiceOptions,
|
|
627
|
+
}
|
package/safari.js
CHANGED
|
@@ -154,9 +154,9 @@ class Driver extends webdriver.WebDriver {
|
|
|
154
154
|
service.start().then((url) => new http.HttpClient(url))
|
|
155
155
|
)
|
|
156
156
|
|
|
157
|
-
return /** @type {!Driver} */ (
|
|
158
|
-
service.kill()
|
|
159
|
-
)
|
|
157
|
+
return /** @type {!Driver} */ (
|
|
158
|
+
super.createSession(executor, caps, () => service.kill())
|
|
159
|
+
)
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
package/testing/index.js
CHANGED
|
@@ -89,7 +89,7 @@ function warn(msg) {
|
|
|
89
89
|
* Extracts the browsers for a test suite to target from the `SELENIUM_BROWSER`
|
|
90
90
|
* environment variable.
|
|
91
91
|
*
|
|
92
|
-
* @return {
|
|
92
|
+
* @return {{name: string, version: string, platform: string}[]} the browsers to target.
|
|
93
93
|
*/
|
|
94
94
|
function getBrowsersToTestFromEnv() {
|
|
95
95
|
let browsers = process.env['SELENIUM_BROWSER']
|
|
@@ -272,7 +272,7 @@ class Environment {
|
|
|
272
272
|
* @return {function(): boolean} a new predicate function.
|
|
273
273
|
*/
|
|
274
274
|
browsers(...browsersToIgnore) {
|
|
275
|
-
return () => browsersToIgnore.indexOf(this.browser.name)
|
|
275
|
+
return () => browsersToIgnore.indexOf(this.browser.name) !== -1
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
/**
|
|
@@ -286,12 +286,19 @@ class Environment {
|
|
|
286
286
|
const builder = new Builder()
|
|
287
287
|
builder.disableEnvironmentOverrides()
|
|
288
288
|
|
|
289
|
+
|
|
290
|
+
|
|
289
291
|
const realBuild = builder.build
|
|
290
292
|
builder.build = function () {
|
|
291
|
-
builder.
|
|
293
|
+
builder.forBrowser(browser.name, browser.version, browser.platform);
|
|
294
|
+
|
|
292
295
|
|
|
293
296
|
if (browser.capabilities) {
|
|
294
|
-
builder.getCapabilities().merge(browser.capabilities)
|
|
297
|
+
builder.getCapabilities().merge(browser.capabilities);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if(browser.name === 'firefox') {
|
|
301
|
+
builder.setCapability('moz:debuggerAddress', true);
|
|
295
302
|
}
|
|
296
303
|
|
|
297
304
|
if (typeof urlOrServer === 'string') {
|