selenium-webdriver 4.8.1 → 4.8.2
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 +11 -0
- package/bin/linux/selenium-manager +0 -0
- package/bin/macos/selenium-manager +0 -0
- package/bin/windows/selenium-manager.exe +0 -0
- package/chrome.js +3 -8
- package/common/seleniumManager.js +15 -7
- package/edge.js +3 -9
- package/firefox.js +3 -7
- package/ie.js +3 -8
- package/lib/webdriver.js +1 -1
- package/package.json +1 -1
package/CHANGES.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/chrome.js
CHANGED
|
@@ -160,10 +160,6 @@ class ServiceBuilder extends chromium.ServiceBuilder {
|
|
|
160
160
|
let exe = opt_exe || locateSynchronously()
|
|
161
161
|
|
|
162
162
|
if (!exe) {
|
|
163
|
-
console.log(
|
|
164
|
-
` The ChromeDriver could not be found on the current PATH, trying Selenium Manager`
|
|
165
|
-
)
|
|
166
|
-
|
|
167
163
|
try {
|
|
168
164
|
exe = driverLocation(Browser.CHROME)
|
|
169
165
|
} catch (err) {
|
|
@@ -173,10 +169,9 @@ class ServiceBuilder extends chromium.ServiceBuilder {
|
|
|
173
169
|
|
|
174
170
|
if (!exe) {
|
|
175
171
|
throw Error(
|
|
176
|
-
`
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
and ensure it can be found on your PATH.`
|
|
172
|
+
`ChromeDriver could not be found on the PATH.
|
|
173
|
+
For more information on how to install drivers see
|
|
174
|
+
https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/.`
|
|
180
175
|
)
|
|
181
176
|
}
|
|
182
177
|
|
|
@@ -69,22 +69,30 @@ function driverLocation(browser) {
|
|
|
69
69
|
)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
let args = [getBinary(), '--browser', browser]
|
|
73
|
-
let
|
|
72
|
+
let args = [getBinary(), '--browser', browser, '--output', 'json']
|
|
73
|
+
let output
|
|
74
74
|
|
|
75
75
|
try {
|
|
76
|
-
|
|
76
|
+
output = JSON.parse(execSync(args.join(' ')).toString())
|
|
77
77
|
} catch (e) {
|
|
78
|
+
let error
|
|
79
|
+
try {
|
|
80
|
+
error = JSON.parse(e.stdout.toString()).result.message
|
|
81
|
+
} catch (e) {
|
|
82
|
+
error = e.toString()
|
|
83
|
+
}
|
|
78
84
|
throw new Error(
|
|
79
|
-
`Error executing command with ${args}
|
|
85
|
+
`Error executing command with ${args}: ${error}`
|
|
80
86
|
)
|
|
81
87
|
}
|
|
82
88
|
|
|
83
|
-
|
|
84
|
-
|
|
89
|
+
for (const key in output.logs){
|
|
90
|
+
if (output.logs[key].level === 'WARN') {
|
|
91
|
+
console.warn(`${output.logs[key].message}`)
|
|
92
|
+
}
|
|
85
93
|
}
|
|
86
94
|
|
|
87
|
-
return result.
|
|
95
|
+
return output.result.message
|
|
88
96
|
}
|
|
89
97
|
|
|
90
98
|
// PUBLIC API
|
package/edge.js
CHANGED
|
@@ -109,10 +109,6 @@ class ServiceBuilder extends chromium.ServiceBuilder {
|
|
|
109
109
|
let exe = opt_exe || locateSynchronously()
|
|
110
110
|
|
|
111
111
|
if (!exe) {
|
|
112
|
-
console.log(
|
|
113
|
-
`The WebDriver for Edge could not be found on the current PATH, trying Selenium Manager`
|
|
114
|
-
)
|
|
115
|
-
|
|
116
112
|
try {
|
|
117
113
|
exe = driverLocation('edge')
|
|
118
114
|
} catch (err) {
|
|
@@ -122,13 +118,11 @@ class ServiceBuilder extends chromium.ServiceBuilder {
|
|
|
122
118
|
|
|
123
119
|
if (!exe) {
|
|
124
120
|
throw Error(
|
|
125
|
-
`
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
`and ensure it can be found on your PATH.`
|
|
121
|
+
`MSEdgeDriver could not be found on the PATH.
|
|
122
|
+
For more information on how to install drivers see
|
|
123
|
+
https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/.`
|
|
129
124
|
)
|
|
130
125
|
}
|
|
131
|
-
|
|
132
126
|
super(exe)
|
|
133
127
|
this.setLoopback(true)
|
|
134
128
|
}
|
package/firefox.js
CHANGED
|
@@ -474,10 +474,6 @@ function findGeckoDriver() {
|
|
|
474
474
|
let exe = locateSynchronously()
|
|
475
475
|
|
|
476
476
|
if (!exe) {
|
|
477
|
-
console.log(
|
|
478
|
-
`The ${GECKO_DRIVER_EXE} executable could not be found on the current PATH, trying Selenium Manager`
|
|
479
|
-
)
|
|
480
|
-
|
|
481
477
|
try {
|
|
482
478
|
exe = driverLocation(Browser.FIREFOX)
|
|
483
479
|
} catch (err) {
|
|
@@ -487,9 +483,9 @@ function findGeckoDriver() {
|
|
|
487
483
|
|
|
488
484
|
if (!exe) {
|
|
489
485
|
throw Error(
|
|
490
|
-
`
|
|
491
|
-
|
|
492
|
-
|
|
486
|
+
`GeckoDriver could not be found on the PATH.
|
|
487
|
+
For more information on how to install drivers see
|
|
488
|
+
https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/.`
|
|
493
489
|
)
|
|
494
490
|
}
|
|
495
491
|
|
package/ie.js
CHANGED
|
@@ -401,10 +401,6 @@ function createServiceFromCapabilities(capabilities) {
|
|
|
401
401
|
|
|
402
402
|
let exe = locateSynchronously()
|
|
403
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
404
|
try {
|
|
409
405
|
exe = driverLocation('iexplorer')
|
|
410
406
|
} catch (err) {
|
|
@@ -414,10 +410,9 @@ function createServiceFromCapabilities(capabilities) {
|
|
|
414
410
|
|
|
415
411
|
if (!exe || !fs.existsSync(exe)) {
|
|
416
412
|
throw Error(
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
'ensure it can be found on your system PATH.'
|
|
413
|
+
`IEDriver could not be found on the PATH.
|
|
414
|
+
For more information on how to install drivers see
|
|
415
|
+
https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/.`
|
|
421
416
|
)
|
|
422
417
|
}
|
|
423
418
|
|
package/lib/webdriver.js
CHANGED
|
@@ -1405,7 +1405,7 @@ class WebDriver {
|
|
|
1405
1405
|
if (requestPausedParams.request.url == httpResponse.urlToIntercept) {
|
|
1406
1406
|
connection.execute('Fetch.fulfillRequest', {
|
|
1407
1407
|
requestId: requestPausedParams['requestId'],
|
|
1408
|
-
responseCode:
|
|
1408
|
+
responseCode: httpResponse.status,
|
|
1409
1409
|
responseHeaders: httpResponse.headers,
|
|
1410
1410
|
body: httpResponse.body,
|
|
1411
1411
|
})
|