selenium-webdriver 4.0.0-beta.4 → 4.1.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/net/portprober.js CHANGED
@@ -29,7 +29,7 @@ const net = require('net')
29
29
  */
30
30
  function isFree(port, opt_host) {
31
31
  return new Promise((resolve, reject) => {
32
- let server = net.createServer().on('error', function (e) {
32
+ const server = net.createServer().on('error', function (e) {
33
33
  if (e.code === 'EADDRINUSE' || e.code === 'EACCES') {
34
34
  resolve(false)
35
35
  } else {
package/opera.js CHANGED
@@ -383,9 +383,9 @@ class Driver extends webdriver.WebDriver {
383
383
  caps = options.toCapabilities(caps)
384
384
  }
385
385
 
386
- return /** @type {!Driver} */ (super.createSession(executor, caps, () =>
387
- service.kill()
388
- ))
386
+ return /** @type {!Driver} */ (
387
+ super.createSession(executor, caps, () => service.kill())
388
+ )
389
389
  }
390
390
 
391
391
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "selenium-webdriver",
3
- "version": "4.0.0-beta.4",
3
+ "version": "4.1.0",
4
4
  "description": "The official WebDriver JavaScript bindings from the Selenium project",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -24,7 +24,6 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "jszip": "^3.6.0",
27
- "rimraf": "^3.0.2",
28
27
  "tmp": "^0.2.1",
29
28
  "ws": ">=7.4.6"
30
29
  },
@@ -35,7 +34,7 @@
35
34
  "eslint-plugin-node": "^11.1.0",
36
35
  "eslint-plugin-prettier": "^3.4.0",
37
36
  "express": "^4.17.1",
38
- "jasmine": "^3.6.1",
37
+ "jasmine": "^3.8.0",
39
38
  "mocha": "^8.1.0",
40
39
  "multer": "^1.4.2",
41
40
  "prettier": "^2.3.0",
package/remote/index.js CHANGED
@@ -448,7 +448,7 @@ DriverService.Builder = class {
448
448
 
449
449
  /**
450
450
  * Manages the life and death of the
451
- * <a href="http://selenium-release.storage.googleapis.com/index.html">
451
+ * <a href="https://www.selenium.dev/downloads/">
452
452
  * standalone Selenium server</a>.
453
453
  */
454
454
  class SeleniumServer extends DriverService {
@@ -464,7 +464,7 @@ class SeleniumServer extends DriverService {
464
464
  throw Error('Path to the Selenium jar not specified')
465
465
  }
466
466
 
467
- var options = opt_options || {}
467
+ const options = opt_options || {}
468
468
 
469
469
  if (options.port < 0) {
470
470
  throw Error('Port must be >= 0: ' + options.port)
@@ -562,7 +562,7 @@ SeleniumServer.Options = class {
562
562
  /**
563
563
  * A {@link webdriver.FileDetector} that may be used when running
564
564
  * against a remote
565
- * [Selenium server](http://selenium-release.storage.googleapis.com/index.html).
565
+ * [Selenium server](https://www.selenium.dev/downloads/).
566
566
  *
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
package/testing/index.js CHANGED
@@ -40,14 +40,14 @@ const ie = require('../ie')
40
40
  const remote = require('../remote')
41
41
  const safari = require('../safari')
42
42
  const opera = require('../opera')
43
- const { Browser } = require('../lib/capabilities')
43
+ const { Browser, Capabilities } = require('../lib/capabilities')
44
44
  const { Builder } = require('../index')
45
45
 
46
46
  /**
47
47
  * Describes a browser targeted by a {@linkplain suite test suite}.
48
48
  * @record
49
49
  */
50
- function TargetBrowser() { }
50
+ function TargetBrowser() {}
51
51
 
52
52
  /**
53
53
  * The {@linkplain Browser name} of the targeted browser.
@@ -210,7 +210,7 @@ function init(force = false) {
210
210
  if (seleniumJar && seleniumUrl) {
211
211
  throw Error(
212
212
  'Ambiguous test configuration: both SELENIUM_REMOTE_URL' +
213
- ' && SELENIUM_SERVER_JAR environment variables are set'
213
+ ' && SELENIUM_SERVER_JAR environment variables are set'
214
214
  )
215
215
  }
216
216
 
@@ -218,8 +218,8 @@ function init(force = false) {
218
218
  if ((seleniumJar || seleniumUrl) && envBrowsers.length === 0) {
219
219
  throw Error(
220
220
  'Ambiguous test configuration: when either the SELENIUM_REMOTE_URL or' +
221
- ' SELENIUM_SERVER_JAR environment variable is set, the' +
222
- ' SELENIUM_BROWSER variable must also be set.'
221
+ ' SELENIUM_SERVER_JAR environment variable is set, the' +
222
+ ' SELENIUM_BROWSER variable must also be set.'
223
223
  )
224
224
  }
225
225
 
@@ -288,8 +288,7 @@ class Environment {
288
288
 
289
289
  const realBuild = builder.build
290
290
  builder.build = function () {
291
-
292
- builder.forBrowser(browser.name, browser.version, browser.platform)
291
+ builder.withCapabilities(Capabilities[browser.name].apply(Capabilities))
293
292
 
294
293
  if (browser.capabilities) {
295
294
  builder.getCapabilities().merge(browser.capabilities)
@@ -311,7 +310,7 @@ class Environment {
311
310
  * Configuration options for a {@linkplain ./index.suite test suite}.
312
311
  * @record
313
312
  */
314
- function SuiteOptions() { }
313
+ function SuiteOptions() {}
315
314
 
316
315
  /**
317
316
  * The browsers to run the test suite against.
@@ -486,8 +485,8 @@ function getTestHook(name) {
486
485
  if (type !== 'function') {
487
486
  throw TypeError(
488
487
  `Expected global.${name} to be a function, but is ${type}.` +
489
- ' This can happen if you try using this module when running with' +
490
- ' node directly instead of using jasmine or mocha'
488
+ ' This can happen if you try using this module when running with' +
489
+ ' node directly instead of using jasmine or mocha'
491
490
  )
492
491
  }
493
492
  return fn