selenium-webdriver 4.2.0 → 4.4.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,19 @@
1
+ ## v4.4.0
2
+ * Add support CDP 104 and remove CDP 101
3
+
4
+ ## v4.3.1
5
+
6
+ * create new default service for every driver instance in chromium (#10796)
7
+ * Updated jsdoc for move action (#10816)
8
+
9
+ ## v4.3.0
10
+
11
+ * Fix: using fulfillRequest when intercepting (#10764)
12
+ * Add support CDP 103 and remove CDP 100
13
+ * Remove unused param in input.js & minor code cleanup
14
+ * Fixes lint issues and updates npm packages
15
+ * feat: Added virtual authenticator (#10663)
16
+
1
17
  ## v4.2.0
2
18
 
3
19
  * Delete old android-driver
@@ -84,7 +100,7 @@
84
100
  ServiceBuilder, similarly to the other options provided by ChromeDriver.
85
101
 
86
102
  * Add the debuggerAddress option to chromium.js (#9561) [Author: Brandon Walderman]
87
- * Adds http client options (#9638)[Author: Dharin Shah]
103
+ * Adds http client options [#9638](Author: Dharin Shah)
88
104
  * Updating edge.js to extend chromium.driver (fixes #9626)
89
105
 
90
106
  ## v4.0.0-beta.4
@@ -116,7 +132,7 @@
116
132
  ## v4.0.0-beta.1
117
133
 
118
134
  * JS Binding support for WebDriver Bidi in Firefox
119
- - This requires Firefox 87 and Geckodriver 0.29 to be able to work
135
+ * This requires Firefox 87 and Geckodriver 0.29 to be able to work
120
136
  * Update the supported CDP versions
121
137
  * Update tmp package version (#9155)
122
138
  * Adding support for /computedlabel (getAccessibleName) (#9073)
@@ -130,11 +146,11 @@
130
146
 
131
147
  * Rolling back native support for Opera Browser
132
148
  * Added new ieOptions capabilities:
133
- - fileUploadDialogTimeout
134
- - setEdgePath
135
- - setEdgeChromium
136
- - setScrollBehavior
137
- - For consistent naming, deprecating `addArguments(...args)` in favor of `addBrowserCommandSwitches(...args)`
149
+ * fileUploadDialogTimeout
150
+ * setEdgePath
151
+ * setEdgeChromium
152
+ * setScrollBehavior
153
+ * For consistent naming, deprecating `addArguments(...args)` in favor of `addBrowserCommandSwitches(...args)`
138
154
 
139
155
  * Added relative locators
140
156
  * Added Chrome DevTools Protocol (CDP) support
@@ -207,11 +223,11 @@ mode (see `example/headless.js`)
207
223
  ### API Changes
208
224
 
209
225
  * The core WebDriver API no longer uses promise manager
210
- - Removed `index.Builder#setControlFlow()`
211
- - The following thenable types no longer have a `cancel()` method:
212
- - The dynamically generated thenable WebDrivers created by `index.Builder`
213
- - `lib/webdriver.AlertPromise`
214
- - `lib/webdriver.WebElementPromise`
226
+ * Removed `index.Builder#setControlFlow()`
227
+ * The following thenable types no longer have a `cancel()` method:
228
+ * The dynamically generated thenable WebDrivers created by `index.Builder`
229
+ * `lib/webdriver.AlertPromise`
230
+ * `lib/webdriver.WebElementPromise`
215
231
  * Removed `remote/index.DriverService.prototype.stop()` (use `#kill()` instead)
216
232
  * Removed the `lib/actions` module
217
233
  * Removed the `lib/events` module
@@ -219,123 +235,123 @@ mode (see `example/headless.js`)
219
235
  * Removed the 'opera' module
220
236
  * Removed the promise manager from `lib/promise`, which includes the removal of the following
221
237
  exported names (replacements, if any, in parentheses):
222
- - CancellableThenable
223
- - CancellationError
224
- - ControlFlow
225
- - Deferred
226
- - LONG_STACK_TRACES
227
- - MultipleUnhandledRejectionError
228
- - Promise (use native Promises)
229
- - Resolver
230
- - Scheduler
231
- - Thenable
232
- - USE_PROMISE_MANAGER
233
- - all (use Promise.all)
234
- - asap (use Promise.resolve)
235
- - captureStackTrace (use Error.captureStackTrace)
236
- - consume (use async functions)
237
- - controlFlow
238
- - createPromise (use new Promise)
239
- - defer
240
- - fulfilled (use Promise.resolve)
241
- - isGenerator
242
- - rejected (use Promise.reject)
243
- - setDefaultFlow
244
- - when (use Promise.resolve)
238
+ * CancellableThenable
239
+ * CancellationError
240
+ * ControlFlow
241
+ * Deferred
242
+ * LONG_STACK_TRACES
243
+ * MultipleUnhandledRejectionError
244
+ * Promise (use native Promises)
245
+ * Resolver
246
+ * Scheduler
247
+ * Thenable
248
+ * USE_PROMISE_MANAGER
249
+ * all (use Promise.all)
250
+ * asap (use Promise.resolve)
251
+ * captureStackTrace (use Error.captureStackTrace)
252
+ * consume (use async functions)
253
+ * controlFlow
254
+ * createPromise (use new Promise)
255
+ * defer
256
+ * fulfilled (use Promise.resolve)
257
+ * isGenerator
258
+ * rejected (use Promise.reject)
259
+ * setDefaultFlow
260
+ * when (use Promise.resolve)
245
261
  * Changes to the `Builder` class:
246
- - Added setChromeService, setEdgeService, & setFirefoxService
247
- - Removed setEnableNativeEvents
248
- - Removed setScrollBehavior
262
+ * Added setChromeService, setEdgeService, & setFirefoxService
263
+ * Removed setEnableNativeEvents
264
+ * Removed setScrollBehavior
249
265
  * Changes to `chrome.Driver`
250
- - Added sendDevToolsCommand
251
- - Added setDownloadPath
266
+ * Added sendDevToolsCommand
267
+ * Added setDownloadPath
252
268
  * Changes to `chrome.Options`
253
- - Now extends the `Capabilities` class
254
- - Removed from/toCapabilities
269
+ * Now extends the `Capabilities` class
270
+ * Removed from/toCapabilities
255
271
  * Changes to `edge.Options`
256
- - Now extends the `Capabilities` class
257
- - Removed from/toCapabilities
272
+ * Now extends the `Capabilities` class
273
+ * Removed from/toCapabilities
258
274
  * Changes to `ie.Options`
259
- - Now extends the `Capabilities` class
260
- - Removed from/toCapabilities
275
+ * Now extends the `Capabilities` class
276
+ * Removed from/toCapabilities
261
277
  * Removed the `firefox.Binary` class. Custom binaries can still be selected using `firefox.Options#setBinary()`. Likewise, custom binary arguments can be specified
262
278
  with `firefox.Options#addArguments()`.
263
279
  * Changes to `firefox.Driver`
264
- - Added installAddon(path)
265
- - Added uninstallAddon(id)
280
+ * Added installAddon(path)
281
+ * Added uninstallAddon(id)
266
282
  * Changes to `firefox.Options`
267
- - Now extends the `Capabilities` class
268
- - Removed from/toCapabilities
269
- - Removed setLoggingPreferences (was a no-op)
270
- - setProfile now only accepts a path to an existing profile
271
- - Added addExtensions
272
- - Added setPreference
283
+ * Now extends the `Capabilities` class
284
+ * Removed from/toCapabilities
285
+ * Removed setLoggingPreferences (was a no-op)
286
+ * setProfile now only accepts a path to an existing profile
287
+ * Added addExtensions
288
+ * Added setPreference
273
289
  * Removed the `firefox.Profile` class. All of its functionality is now provided directly by `firefox.Options`
274
290
  * Removed the `firefox/binary` module
275
291
  * Removed the `firefox/profile` module
276
292
  * Changes to `safari.Options`
277
- - Now extends the `Capabilities` class
278
- - Removed from/toCapabilities
279
- - Removed setCleanSession (was a no-op)
293
+ * Now extends the `Capabilities` class
294
+ * Removed from/toCapabilities
295
+ * Removed setCleanSession (was a no-op)
280
296
  * Changes to `lib/capabilities.Browser`:
281
- - Removed several enum values.
282
- - ANDROID (use Chrome for Android; see docs on the chrome module)
283
- - IPAD (no support available)
284
- - IPHONE (no support available)
285
- - OPERA (use Chrome)
286
- - PHANTOM_JS (use Chrome or Firefox in headless mode)
287
- - HTMLUNIT (use Chrome or Firefox in headless mode)
297
+ * Removed several enum values.
298
+ * ANDROID (use Chrome for Android; see docs on the chrome module)
299
+ * IPAD (no support available)
300
+ * IPHONE (no support available)
301
+ * OPERA (use Chrome)
302
+ * PHANTOM_JS (use Chrome or Firefox in headless mode)
303
+ * HTMLUNIT (use Chrome or Firefox in headless mode)
288
304
  * Changes to `lib/capabilities.Capabilities`:
289
- - Removed static factory methods android(), ipad(), iphone(), opera(), phantomjs(), htmlunit(),
305
+ * Removed static factory methods android(), ipad(), iphone(), opera(), phantomjs(), htmlunit(),
290
306
  and htmlunitwithjs(). Users can still manually configure capabilities for these, but their use
291
307
  is not recommended and they will no longer be surfaced in the API.
292
308
  * Changes to `lib/error`:
293
- - Added
294
- - ElementClickInterceptedError
295
- - InsecureCertificateError
296
- - InvalidCoordinatesError
297
- - NoSuchCookieError
298
- - Removed
299
- - ElementNotVisibleError
300
- - InvalidElementCoordinatesError
309
+ * Added
310
+ * ElementClickInterceptedError
311
+ * InsecureCertificateError
312
+ * InvalidCoordinatesError
313
+ * NoSuchCookieError
314
+ * Removed
315
+ * ElementNotVisibleError
316
+ * InvalidElementCoordinatesError
301
317
  * Changes to `lib/webdriver.WebDriver`:
302
- - Dropped support for "requiredCapabilities" from WebDriver.createSession
303
- - actions() now returns the new `lib/input.Actions` class
304
- - Removed touchActions
305
- - Renamed schedule to execute
306
- - Removed the `WebDriver.attachToSession()` factory method. Users can just the `WebDriver`
318
+ * Dropped support for "requiredCapabilities" from WebDriver.createSession
319
+ * actions() now returns the new `lib/input.Actions` class
320
+ * Removed touchActions
321
+ * Renamed schedule to execute
322
+ * Removed the `WebDriver.attachToSession()` factory method. Users can just the `WebDriver`
307
323
  constructor directly instead.
308
- - Removed the `call()` method. This was used to inject custom function calls into the control
324
+ * Removed the `call()` method. This was used to inject custom function calls into the control
309
325
  flow. Now that the promise manager is no longer used, this method is no longer necessary. Users are now responsible for coordinating actions (ideally with async functions) and can just
310
326
  call functions directly instead of through `driver.call()`.
311
327
  * Changes to `lib/webdriver.WebElement`:
312
- - Replaced getSize & getLocation with getRect
328
+ * Replaced getSize & getLocation with getRect
313
329
  * Changes to `lib/webdriver.Alert`:
314
- - Removed authenticateAs
330
+ * Removed authenticateAs
315
331
  * Changes to `lib/webdriver.Options` (`driver.manage()`):
316
- - Removed timeouts (use get/setTimeouts)
332
+ * Removed timeouts (use get/setTimeouts)
317
333
  * Changes to `lib/webdriver.Window` (`driver.manage().window()`):
318
- - Added
319
- - getRect
320
- - setRect
321
- - fullscreen
322
- - minimize
323
- - Removed (use the getRect/setRect methods)
324
- - getPosition
325
- - setPosition
326
- - getSize
327
- - setSize
334
+ * Added
335
+ * getRect
336
+ * setRect
337
+ * fullscreen
338
+ * minimize
339
+ * Removed (use the getRect/setRect methods)
340
+ * getPosition
341
+ * setPosition
342
+ * getSize
343
+ * setSize
328
344
  * Removed the `testing/assert` module
329
345
  * Changes to `testing/index`
330
- - Since the promise manager has been removed, it is no longer necessary to wrap the Mocha test
346
+ * Since the promise manager has been removed, it is no longer necessary to wrap the Mocha test
331
347
  hooks; instead, users can simply use async functions. The following have all been removed:
332
- - describe
333
- - before
334
- - beforeEach
335
- - after
336
- - afterEach
337
- - it
338
- - Added the `suite` function. For details, refer to the jsdoc or
348
+ * describe
349
+ * before
350
+ * beforeEach
351
+ * after
352
+ * afterEach
353
+ * it
354
+ * Added the `suite` function. For details, refer to the jsdoc or
339
355
  `example/google_search_test.js`
340
356
 
341
357
  ## v3.6.0
@@ -352,18 +368,18 @@ mode (see `example/headless.js`)
352
368
  ### API Changes
353
369
 
354
370
  * Added new methods to `selenium-webdriver/firefox.Options`:
355
- - addArguments()
356
- - headless()
357
- - windowSize()
371
+ * addArguments()
372
+ * headless()
373
+ * windowSize()
358
374
  * Deprecated `selenium-webdriver/firefox/binary.Binary`
359
375
  * Removed `selenium-webdriver/firefox.Options#useGeckoDriver()`
360
376
  * Removed the unused `selenium-webdriver/firefox/profile.decode()`
361
377
  * Removed methods from `selenium-webdriver/firefox/profile.Profile` that had no effect since support
362
378
  for the legacy FirefoxDriver was dropped in 3.5.0:
363
- - setNativeEventsEnabled
364
- - nativeEventsEnabled
365
- - getPort
366
- - setPort
379
+ * setNativeEventsEnabled
380
+ * nativeEventsEnabled
381
+ * getPort
382
+ * setPort
367
383
  * Removed `selenium-webdriver/firefox.ServiceBuilder#setFirefoxBinary()`; custom binaries should be
368
384
  configured through the `firefox.Options` class.
369
385
  * Removed `selenium-webdriver/firefox.Capability`. These hold overs from the legacy FirefoxDriver
@@ -385,9 +401,9 @@ to a remote Selenium server that supports Firefox 45.
385
401
  ### Changes
386
402
 
387
403
  * Removed native support for Firefox 46 and older.
388
- - The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect.
389
- - `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated.
390
- - `selenium-webdriver/firefox.Options#useGeckoDriver()` is deprecated and now a no-op.
404
+ * The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect.
405
+ * `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated.
406
+ * `selenium-webdriver/firefox.Options#useGeckoDriver()` is deprecated and now a no-op.
391
407
  * `firefox.Options` will no longer discard the `"moz:firefoxOptions"` set in user provided
392
408
  capabilities (via `Builder.withCapabilities({})`). When both are used, the settings in `firefox.Options` will be applied _last_.
393
409
  * Added `chrome.Options#headless()` and `chrome.Options#windowSize()`, which may be used to start
@@ -432,6 +448,7 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
432
448
  logging.installConsoleHandler();
433
449
  logging.getLogger('promise.ControlFlow').setLevel(logging.Level.WARNING);
434
450
  ```
451
+
435
452
  * If the `JAVA_HOME` environment variable is set, use it to locate java.exe.
436
453
 
437
454
  ## v3.2.0
@@ -458,8 +475,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
458
475
  ## v3.0.1
459
476
 
460
477
  * More API adjustments to align with native Promises
461
- - Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)`
462
- - Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)`
478
+ * Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)`
479
+ * Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)`
463
480
  * When a `wait()` condition times out, the returned promise will now be rejected with an `error.TimeoutError` instead of a generic `Error` object.
464
481
  * `WebDriver#wait()` will now throw a TypeError if an invalid wait condition is provided.
465
482
  * Properly catch unhandled promise rejections with an action sequence (only impacts when the promise
@@ -494,9 +511,9 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
494
511
 
495
512
  * Removed `safari.Options#useLegacyDriver()`
496
513
  * Reduced the API on `promise.Thenable` for compatibility with native promises:
497
- - Removed `#isPending()`
498
- - Removed `#cancel()`
499
- - Removed `#finally()`
514
+ * Removed `#isPending()`
515
+ * Removed `#cancel()`
516
+ * Removed `#finally()`
500
517
  * Changed all subclasses of `webdriver.WebDriver` to overload the static function `WebDriver.createSession()` instead of doing work in the constructor. All constructors
501
518
  now inherit the base class' function signature. Users are still encouraged to use the `Builder`
502
519
  class instead of creating drivers directly.
@@ -575,32 +592,32 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
575
592
  _seconds_ since epoch. When retrieving cookies, the expiration is always returned in seconds.
576
593
  * Renamed `firefox.Options#useMarionette` to `firefox.Options#useGeckoDriver`
577
594
  * Removed deprecated modules:
578
- - `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\
595
+ * `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\
579
596
  or the `error` property exported by `selenium-webdriver`)
580
- - `selenium-webdriver/executors` — this was not previously deprecated, but is no longer used.
597
+ * `selenium-webdriver/executors` — this was not previously deprecated, but is no longer used.
581
598
  * Removed deprecated types:
582
- - `command.DeferredExecutor` — this was not previously deprecated, but is no longer used. It can
599
+ * `command.DeferredExecutor` — this was not previously deprecated, but is no longer used. It can
583
600
  be trivially implemented by clients should it be needed.
584
- - `error.InvalidSessionIdError` (use `error.NoSuchSessionError`)
585
- - `executors.DeferredExecutor`
586
- - `until.Condition` (use `webdriver.Condition`)
587
- - `until.WebElementCondition` (use `webdriver.WebElementCondition`)
588
- - `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`)
601
+ * `error.InvalidSessionIdError` (use `error.NoSuchSessionError`)
602
+ * `executors.DeferredExecutor`
603
+ * `until.Condition` (use `webdriver.Condition`)
604
+ * `until.WebElementCondition` (use `webdriver.WebElementCondition`)
605
+ * `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`)
589
606
  * Removed deprecated functions:
590
- - `Deferred#cancel()`
591
- - `Deferred#catch()`
592
- - `Deferred#finally()`
593
- - `Deferred#isPending()`
594
- - `Deferred#then()`
595
- - `Promise#thenCatch()`
596
- - `Promise#thenFinally()`
597
- - `WebDriver#isElementPresent()`
598
- - `WebElement#getInnerHtml()`
599
- - `WebElement#getOuterHtml()`
600
- - `WebElement#getRawId()`
601
- - `WebElement#isElementPresent()`
607
+ * `Deferred#cancel()`
608
+ * `Deferred#catch()`
609
+ * `Deferred#finally()`
610
+ * `Deferred#isPending()`
611
+ * `Deferred#then()`
612
+ * `Promise#thenCatch()`
613
+ * `Promise#thenFinally()`
614
+ * `WebDriver#isElementPresent()`
615
+ * `WebElement#getInnerHtml()`
616
+ * `WebElement#getOuterHtml()`
617
+ * `WebElement#getRawId()`
618
+ * `WebElement#isElementPresent()`
602
619
  * Removed deprecated properties:
603
- - `WebDriverError#code`
620
+ * `WebDriverError#code`
604
621
 
605
622
  ## v2.53.2
606
623
 
@@ -841,7 +858,7 @@ major version release (i.e. 1.0.0).
841
858
  The `promise.ControlFlow` class has been updated to track the asynchronous breaks required by
842
859
  Promises/A+, so there are no changes to task execution order.
843
860
  * Updated how errors are annotated on failures. When a task fails, the stacktrace from when that
844
- task was scheduled is appended to the rejection reason with a `From: ` prefix (if it is an Error
861
+ task was scheduled is appended to the rejection reason with a `From:` prefix (if it is an Error
845
862
  object). For example:
846
863
 
847
864
  var driver = new webdriver.Builder().forBrowser('chrome').build();
package/chrome.js CHANGED
@@ -140,7 +140,6 @@ const CHROMEDRIVER_EXE =
140
140
  process.platform === 'win32' ? 'chromedriver.exe' : 'chromedriver'
141
141
 
142
142
  /** @type {remote.DriverService} */
143
- let defaultService = null
144
143
 
145
144
  /**
146
145
  * Creates {@link selenium-webdriver/remote.DriverService} instances that manage
@@ -240,6 +239,14 @@ class Driver extends chromium.Driver {
240
239
  super.createSession(caps, opt_serviceExecutor)
241
240
  )
242
241
  }
242
+
243
+ /**
244
+ * returns new instance chrome driver service
245
+ * @returns {remote.DriverService}
246
+ */
247
+ static getDefaultService() {
248
+ return new ServiceBuilder().build()
249
+ }
243
250
  }
244
251
 
245
252
  /**
@@ -252,47 +259,14 @@ function locateSynchronously() {
252
259
  return io.findInPath(CHROMEDRIVER_EXE, true)
253
260
  }
254
261
 
255
- /**
256
- * Sets the default service to use for new ChromeDriver instances.
257
- * @param {!remote.DriverService} service The service to use.
258
- * @throws {Error} If the default service is currently running.
259
- */
260
- function setDefaultService(service) {
261
- if (defaultService && defaultService.isRunning()) {
262
- throw Error(
263
- `The previously configured ChromeDriver service is still running. ` +
264
- `You must shut it down before you may adjust its configuration.`
265
- )
266
- }
267
- defaultService = service
268
- }
269
-
270
- /**
271
- * Returns the default ChromeDriver service. If such a service has not been
272
- * configured, one will be constructed using the default configuration for
273
- * a ChromeDriver executable found on the system PATH.
274
- * @return {!remote.DriverService} The default ChromeDriver service.
275
- */
276
- function getDefaultService() {
277
- if (!defaultService) {
278
- defaultService = new ServiceBuilder().build()
279
- }
280
- return defaultService
281
- }
282
-
283
262
  Options.prototype.CAPABILITY_KEY = 'goog:chromeOptions'
284
263
  Options.prototype.BROWSER_NAME_VALUE = Browser.CHROME
285
- Driver.getDefaultService = getDefaultService
286
264
  Driver.prototype.VENDOR_COMMAND_PREFIX = 'goog'
287
265
 
288
266
  // PUBLIC API
289
-
290
267
  module.exports = {
291
268
  Driver: Driver,
292
269
  Options,
293
- ServiceBuilder ,
294
- getDefaultService,
295
- setDefaultService,
296
- locateSynchronously
270
+ ServiceBuilder,
271
+ locateSynchronously,
297
272
  }
298
-
package/chromium.js CHANGED
@@ -661,11 +661,13 @@ class Driver extends webdriver.WebDriver {
661
661
  */
662
662
  static createSession(caps, opt_serviceExecutor) {
663
663
  let executor
664
+ let onQuit
664
665
  if (opt_serviceExecutor instanceof http.Executor) {
665
666
  executor = opt_serviceExecutor
666
667
  configureExecutor(executor, this.VENDOR_COMMAND_PREFIX)
667
668
  } else {
668
669
  let service = opt_serviceExecutor || this.getDefaultService()
670
+ onQuit = () => service.kill()
669
671
  executor = createExecutor(service.start(), this.VENDOR_COMMAND_PREFIX)
670
672
  }
671
673
 
@@ -679,7 +681,7 @@ class Driver extends webdriver.WebDriver {
679
681
  }
680
682
  }
681
683
 
682
- return /** @type {!Driver} */ (super.createSession(executor, caps))
684
+ return /** @type {!Driver} */ (super.createSession(executor, caps, onQuit))
683
685
  }
684
686
 
685
687
  /**
@@ -860,7 +862,7 @@ class Driver extends webdriver.WebDriver {
860
862
  * @return {!promise.Thenable<void>} A promise that will be resolved
861
863
  * when the mirror command has been issued to the device.
862
864
  */
863
- startDesktopMirroring(deviceName) {
865
+ startDesktopMirroring(deviceName) {
864
866
  return this.schedule(
865
867
  new command.Command(Command.START_CAST_DESKTOP_MIRRORING).setParameter(
866
868
  'sinkName',
@@ -19,7 +19,7 @@ class CDPConnection {
19
19
  constructor(wsConnection) {
20
20
  this._wsConnection = wsConnection
21
21
  this.cmd_id = 0
22
- this.targetID = null;
22
+ this.targetID = null
23
23
  this.sessionId = null
24
24
  }
25
25
 
package/edge.js CHANGED
@@ -90,7 +90,6 @@ const EDGEDRIVER_CHROMIUM_EXE =
90
90
  process.platform === 'win32' ? 'msedgedriver.exe' : 'msedgedriver'
91
91
 
92
92
  /** @type {remote.DriverService} */
93
- let defaultService = null
94
93
 
95
94
  /**
96
95
  * Creates {@link selenium-webdriver/remote.DriverService} instances that manage
@@ -157,6 +156,14 @@ class Driver extends chromium.Driver {
157
156
  )
158
157
  }
159
158
 
159
+ /**
160
+ * returns new instance of edge driver service
161
+ * @returns {remote.DriverService}
162
+ */
163
+ static getDefaultService() {
164
+ return new ServiceBuilder().build()
165
+ }
166
+
160
167
  /**
161
168
  * This function is a no-op as file detectors are not supported by this
162
169
  * implementation.
@@ -165,34 +172,6 @@ class Driver extends chromium.Driver {
165
172
  setFileDetector() {}
166
173
  }
167
174
 
168
- /**
169
- * Sets the default service to use for new Edge instances.
170
- * @param {!remote.DriverService} service The service to use.
171
- * @throws {Error} If the default service is currently running.
172
- */
173
- function setDefaultService(service) {
174
- if (defaultService && defaultService.isRunning()) {
175
- throw Error(
176
- 'The previously configured EdgeDriver service is still running. ' +
177
- 'You must shut it down before you may adjust its configuration.'
178
- )
179
- }
180
- defaultService = service
181
- }
182
-
183
- /**
184
- * Returns the default Microsoft Edge driver service. If such a service has
185
- * not been configured, one will be constructed using the default configuration
186
- * for a MicrosoftWebDriver executable found on the system PATH.
187
- * @return {!remote.DriverService} The default Microsoft Edge driver service.
188
- */
189
- function getDefaultService() {
190
- if (!defaultService) {
191
- defaultService = new ServiceBuilder().build()
192
- }
193
- return defaultService
194
- }
195
-
196
175
  /**
197
176
  * _Synchronously_ attempts to locate the chromedriver executable on the current
198
177
  * system.
@@ -206,7 +185,6 @@ function locateSynchronously() {
206
185
  Options.prototype.BROWSER_NAME_VALUE = Browser.EDGE
207
186
  Options.prototype.CAPABILITY_KEY = 'ms:edgeOptions'
208
187
  Driver.prototype.VENDOR_CAPABILITY_PREFIX = 'ms'
209
- Driver.getDefaultService = getDefaultService
210
188
 
211
189
  // PUBLIC API
212
190
 
@@ -214,7 +192,5 @@ module.exports = {
214
192
  Driver,
215
193
  Options,
216
194
  ServiceBuilder,
217
- getDefaultService,
218
- setDefaultService,
219
195
  locateSynchronously,
220
196
  }
package/firefox.js CHANGED
@@ -672,7 +672,7 @@ class Driver extends webdriver.WebDriver {
672
672
  */
673
673
  async installAddon(path, temporary = false) {
674
674
  let stats = fs.statSync(path)
675
- let buf;
675
+ let buf
676
676
  if (stats.isDirectory()) {
677
677
  let zip = new Zip()
678
678
  await zip.addDir(path)
package/ie.js CHANGED
@@ -402,9 +402,9 @@ function createServiceFromCapabilities(capabilities) {
402
402
  if (!exe || !fs.existsSync(exe)) {
403
403
  throw Error(
404
404
  `${IEDRIVER_EXE} could not be found on the current PATH. Please ` +
405
- `download the latest version of ${IEDRIVER_EXE} from ` +
406
- 'https://www.selenium.dev/downloads/ and ' +
407
- 'ensure it can be found on your system PATH.'
405
+ `download the latest version of ${IEDRIVER_EXE} from ` +
406
+ 'https://www.selenium.dev/downloads/ and ' +
407
+ 'ensure it can be found on your system PATH.'
408
408
  )
409
409
  }
410
410
 
package/index.js CHANGED
@@ -77,7 +77,7 @@ function startSeleniumServer(jar) {
77
77
  function ensureFileDetectorsAreEnabled(ctor) {
78
78
  return class extends ctor {
79
79
  /** @param {input.FileDetector} detector */
80
- setFileDetector (detector) {
80
+ setFileDetector(detector) {
81
81
  webdriver.WebDriver.prototype.setFileDetector.call(this, detector)
82
82
  }
83
83
  }
package/lib/command.js CHANGED
@@ -164,6 +164,15 @@ const Name = {
164
164
  FIND_ELEMENT_FROM_SHADOWROOT: 'findElementFromShadowRoot',
165
165
  FIND_ELEMENTS_FROM_SHADOWROOT: 'findElementsFromShadowRoot',
166
166
 
167
+ // Virtual Authenticator Commands
168
+ ADD_VIRTUAL_AUTHENTICATOR: 'addVirtualAuthenticator',
169
+ REMOVE_VIRTUAL_AUTHENTICATOR: 'removeVirtualAuthenticator',
170
+ ADD_CREDENTIAL: 'addCredential',
171
+ GET_CREDENTIALS: 'getCredentials',
172
+ REMOVE_CREDENTIAL: 'removeCredential',
173
+ REMOVE_ALL_CREDENTIALS: 'removeAllCredentials',
174
+ SET_USER_VERIFIED: 'setUserVerified',
175
+
167
176
  GET_AVAILABLE_LOG_TYPES: 'getAvailableLogTypes',
168
177
  GET_LOG: 'getLog',
169
178