selenium-webdriver 4.6.1 → 4.7.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 CHANGED
@@ -1,3 +1,14 @@
1
+ ## v4.7.0
2
+
3
+ #### :rocket: New Feature
4
+
5
+ * Add support for Selenium Manager to work with IE Driver
6
+
7
+ #### :nail_care: Polish
8
+
9
+ * Adding CDP files for v108 and removing v105
10
+ * Improve error handling for Selenium Manager
11
+
1
12
  ## v4.6.1
2
13
 
3
14
  #### :bug: Bug Fix
Binary file
Binary file
Binary file
@@ -76,12 +76,12 @@ function driverLocation(browser) {
76
76
  result = execSync(args.join(' ')).toString()
77
77
  } catch (e) {
78
78
  throw new Error(
79
- `Error executing command with ${args} : Error ${e.stderr.toString()}`
79
+ `Error executing command with ${args}\n${e.stdout.toString()}${e.stderr.toString()}`
80
80
  )
81
81
  }
82
82
 
83
83
  if (!result.startsWith('INFO\t')) {
84
- throw new Error(`Unsuccessful command executed ${args}}`)
84
+ throw new Error(`Unsuccessful command executed: ${args}\n${result}`)
85
85
  }
86
86
 
87
87
  return result.replace('INFO\t', '').trim()
package/ie.js CHANGED
@@ -35,6 +35,7 @@ const remote = require('./remote')
35
35
  const webdriver = require('./lib/webdriver')
36
36
  const { Browser, Capabilities } = require('./lib/capabilities')
37
37
  const error = require('./lib/error')
38
+ const { driverLocation } = require('./common/seleniumManager')
38
39
 
39
40
  const IEDRIVER_EXE = 'IEDriverServer.exe'
40
41
  const OPTIONS_CAPABILITY_KEY = 'se:ieOptions'
@@ -399,6 +400,18 @@ function createServiceFromCapabilities(capabilities) {
399
400
  }
400
401
 
401
402
  let exe = locateSynchronously()
403
+ if (!exe) {
404
+ console.log(
405
+ `The ${IEDRIVER_EXE} executable could not be found on the current PATH, trying Selenium Manager`
406
+ )
407
+
408
+ try {
409
+ exe = driverLocation(Browser.INTERNET_EXPLORER)
410
+ } catch (err) {
411
+ console.log(`Unable to obtain driver using Selenium Manager: ${err}`)
412
+ }
413
+ }
414
+
402
415
  if (!exe || !fs.existsSync(exe)) {
403
416
  throw Error(
404
417
  `${IEDRIVER_EXE} could not be found on the current PATH. Please ` +
package/io/zip.js CHANGED
@@ -68,8 +68,8 @@ class Zip {
68
68
  * @param {string} dirPath path to the directory to add.
69
69
  * @param {string=} zipPath path to the folder in the archive to add the
70
70
  * directory contents to. Defaults to the root folder.
71
- * @return {!Promise<?>} returns a promise that will resolve when the
72
- * the operation is complete.
71
+ * @return {!Promise<?>} returns a promise that will resolve when
72
+ * the operation is complete.
73
73
  */
74
74
  addDir(dirPath, zipPath = '') {
75
75
  return io.walkDir(dirPath).then((entries) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "selenium-webdriver",
3
- "version": "4.6.1",
3
+ "version": "4.7.0",
4
4
  "description": "The official WebDriver JavaScript bindings from the Selenium project",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -28,18 +28,18 @@
28
28
  "ws": ">=8.7.0"
29
29
  },
30
30
  "devDependencies": {
31
- "eslint": "^8.16.0",
31
+ "eslint": "^8.27.0",
32
32
  "eslint-config-prettier": "^8.5.0",
33
- "eslint-plugin-no-only-tests": "^2.6.0",
33
+ "eslint-plugin-no-only-tests": "^3.1.0",
34
34
  "eslint-plugin-node": "^11.1.0",
35
- "eslint-plugin-prettier": "^4.0.0",
36
- "express": "^4.17.1",
37
- "jasmine": "^3.8.0",
38
- "mocha": "^10.0.0",
35
+ "eslint-plugin-prettier": "^4.2.0",
36
+ "express": "^4.18.2",
37
+ "jasmine": "^4.5.0",
38
+ "mocha": "^10.1.0",
39
39
  "multer": "^1.4.5-lts.1",
40
- "prettier": "^2.6.1",
40
+ "prettier": "^2.7.1",
41
41
  "serve-index": "^1.9.1",
42
- "sinon": "^10.0.0"
42
+ "sinon": "^14.0.2"
43
43
  },
44
44
  "scripts": {
45
45
  "lint": "eslint --ignore-pattern node_modules --ignore-pattern generator --fix --ext js lib/http.js \"**/*.js\"",