selenium-webdriver 4.16.0 → 4.18.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.
Files changed (65) hide show
  1. package/CHANGES.md +253 -196
  2. package/LICENSE +1 -1
  3. package/NOTICE +1 -1
  4. package/bidi/addInterceptParameters.js +86 -0
  5. package/bidi/browsingContext.js +167 -38
  6. package/bidi/browsingContextInspector.js +13 -40
  7. package/bidi/evaluateResult.js +4 -10
  8. package/bidi/filterBy.js +2 -6
  9. package/bidi/index.js +31 -29
  10. package/bidi/input.js +97 -0
  11. package/bidi/interceptPhase.js +24 -0
  12. package/bidi/logInspector.js +15 -20
  13. package/bidi/network.js +178 -0
  14. package/bidi/networkInspector.js +12 -2
  15. package/bidi/networkTypes.js +22 -49
  16. package/bidi/protocolType.js +4 -9
  17. package/bidi/protocolValue.js +48 -17
  18. package/bidi/realmInfo.js +3 -10
  19. package/bidi/scriptManager.js +60 -48
  20. package/bidi/scriptTypes.js +58 -0
  21. package/bidi/urlPattern.js +58 -0
  22. package/bin/linux/selenium-manager +0 -0
  23. package/bin/macos/selenium-manager +0 -0
  24. package/bin/windows/selenium-manager.exe +0 -0
  25. package/chrome.js +2 -14
  26. package/chromium.js +28 -143
  27. package/common/driverFinder.js +1 -1
  28. package/common/seleniumManager.js +5 -12
  29. package/devtools/CDPConnection.js +1 -3
  30. package/edge.js +1 -3
  31. package/example/chrome_android.js +2 -5
  32. package/example/chrome_mobile_emulation.js +2 -4
  33. package/example/google_search.js +1 -3
  34. package/example/headless.js +4 -10
  35. package/example/logging.js +3 -9
  36. package/firefox.js +37 -111
  37. package/http/index.js +7 -10
  38. package/ie.js +5 -15
  39. package/index.js +10 -32
  40. package/io/exec.js +1 -2
  41. package/io/index.js +3 -3
  42. package/io/zip.js +8 -30
  43. package/lib/atoms/find-elements.js +1 -1
  44. package/lib/atoms/get-attribute.js +6 -100
  45. package/lib/by.js +2 -9
  46. package/lib/capabilities.js +8 -7
  47. package/lib/command.js +4 -0
  48. package/lib/error.js +2 -9
  49. package/lib/http.js +37 -130
  50. package/lib/input.js +22 -34
  51. package/lib/logging.js +3 -11
  52. package/lib/promise.js +2 -7
  53. package/lib/select.js +3 -9
  54. package/lib/until.js +28 -49
  55. package/lib/util.js +1 -4
  56. package/lib/virtual_authenticator.js +4 -22
  57. package/lib/webdriver.js +146 -269
  58. package/lib/webelement.js +1 -5
  59. package/net/index.js +1 -4
  60. package/package.json +2 -1
  61. package/remote/index.js +9 -24
  62. package/remote/util.js +6 -19
  63. package/safari.js +3 -8
  64. package/testing/index.js +6 -11
  65. package/example/firefox_channels.js +0 -84
package/CHANGES.md CHANGED
@@ -1,3 +1,33 @@
1
+ ## 4.18.0
2
+
3
+ * Fix running the casting related methods in chromium (#13479)
4
+ * [bidi] Add browsing context destroyed event
5
+ * [bidi] Add realm destroyed event
6
+ * [bidi] Add locate node command (#13489)
7
+ * [bidi] Deprecate NetworkInspector in favor of Network
8
+ * Make `npm run lint` pass for javascript/node/selenium-webdriver (#13560)
9
+ * [bidi] Add "addintercept" and "removeintercept" commands (#13564)
10
+ * [bidi] Add auth related commands (#13572)
11
+ * [bidi] Add 'continueWithAuth' command
12
+ * [bidi] Add 'fetchError' command
13
+
14
+ ## 4.17.0
15
+
16
+ * Add javascript to Selenium Manager input for tracking (see #13288)
17
+ * remove deprecated headless methods and associated references
18
+ * Add script message event (#13153)
19
+ * Update channel name from Aurora to Dev
20
+ * Remove firefox_channels.js example as Channels is deprecated
21
+ * Add Input module command (#13360)
22
+ * remove all references to firefox-bin
23
+ * download files from remote server (#13102)
24
+ * Add auth required event
25
+ * Add traverse history command
26
+ * Add test to get iframe's browsing context
27
+ * Add Input module JS command
28
+ * Add test for node properties in
29
+ * Add CDP for Chrome 121 and remove 118
30
+
1
31
  ## 4.16.0
2
32
 
3
33
  #### :bug: Bug fix
@@ -9,7 +39,6 @@
9
39
 
10
40
  * Add CDP v120 and remove v117
11
41
 
12
-
13
42
  ## 4.15.0
14
43
 
15
44
  #### :bug: Bug fix
@@ -37,7 +66,7 @@
37
66
  #### :nail_care: Polish
38
67
 
39
68
  * Adding CDP v117 and removing v114
40
- * Added file location to exception message for Selenium Manager
69
+ * Added file location to exception message for Selenium Manager
41
70
 
42
71
  #### :rocket: New Feature
43
72
 
@@ -231,15 +260,15 @@ fix: iedriver download with selenium-manager #11579
231
260
  #### :rocket: New Feature
232
261
 
233
262
  * Adds 'Select' support package
234
- * selectByIndex
235
- * selectByValue
236
- * selectByVisibleText
237
- * getAllSelectedOptions
238
- * getFirstSelectedOption
239
- * deselectAll
240
- * deselectByVisibleText
241
- * deselectByIndex
242
- * deselectByValue
263
+ * selectByIndex
264
+ * selectByValue
265
+ * selectByVisibleText
266
+ * getAllSelectedOptions
267
+ * getFirstSelectedOption
268
+ * deselectAll
269
+ * deselectByVisibleText
270
+ * deselectByIndex
271
+ * deselectByValue
243
272
  * Add support for Actions API sendKeys to designated element
244
273
  * Adds mouse button enum for forward and backward navigation
245
274
 
@@ -247,7 +276,8 @@ fix: iedriver download with selenium-manager #11579
247
276
 
248
277
  * Set min node support to 14.x.x (issue 1 in #10970)
249
278
  * fix: geckodriver session with node 18.x.x (issue 2 in #10970)
250
- * fix: JS firefox driver crashes on setting a profile (fixed with [commit](https://github.com/SeleniumHQ/selenium/commit/fa6deeea6bda1e73317157845772e114bd569b7d))
279
+ * fix: JS firefox driver crashes on setting a profile (fixed
280
+ with [commit](https://github.com/SeleniumHQ/selenium/commit/fa6deeea6bda1e73317157845772e114bd569b7d))
251
281
  * fix: "SetExperimental" option is not available in webdriverjs (Javascript/Typescript) (#10959)
252
282
  * fix: Do not allow Select class to select disabled options (#10812)
253
283
 
@@ -317,7 +347,8 @@ fix: iedriver download with selenium-manager #11579
317
347
  * ignore errors arising from trying to use file detector fixes #6343
318
348
  * Added RelativeBy class on the main api (#10148)
319
349
  * Code cleanup and minor improvements
320
- * Implements 'getDomAttribute' to get attribute value as defined by w3c spec and removes legacy command usages
350
+ * Implements 'getDomAttribute' to get attribute value as defined by w3c spec and removes legacy
351
+ command usages
321
352
  * Remove legacy JWP support and w3c<boolean> switch (#10095)
322
353
  * update map/filter clean up to common format (#10094)
323
354
 
@@ -400,7 +431,7 @@ fix: iedriver download with selenium-manager #11579
400
431
  ## v4.0.0-beta.1
401
432
 
402
433
  * JS Binding support for WebDriver Bidi in Firefox
403
- * This requires Firefox 87 and Geckodriver 0.29 to be able to work
434
+ * This requires Firefox 87 and Geckodriver 0.29 to be able to work
404
435
  * Update the supported CDP versions
405
436
  * Update tmp package version (#9155)
406
437
  * Adding support for /computedlabel (getAccessibleName) (#9073)
@@ -414,11 +445,12 @@ fix: iedriver download with selenium-manager #11579
414
445
 
415
446
  * Rolling back native support for Opera Browser
416
447
  * Added new ieOptions capabilities:
417
- * fileUploadDialogTimeout
418
- * setEdgePath
419
- * setEdgeChromium
420
- * setScrollBehavior
421
- * For consistent naming, deprecating `addArguments(...args)` in favor of `addBrowserCommandSwitches(...args)`
448
+ * fileUploadDialogTimeout
449
+ * setEdgePath
450
+ * setEdgeChromium
451
+ * setScrollBehavior
452
+ * For consistent naming, deprecating `addArguments(...args)` in favor
453
+ of `addBrowserCommandSwitches(...args)`
422
454
 
423
455
  * Added relative locators
424
456
  * Added Chrome DevTools Protocol (CDP) support
@@ -474,28 +506,32 @@ mode (see `example/headless.js`)
474
506
  ### Changes for W3C WebDriver Spec Compliance
475
507
 
476
508
  * Revamped the actions API to conform with the WebDriver Spec:
477
- <https://www.w3.org/TR/webdriver/#actions>. For details, refer to the JS doc on the `lib/input.Actions` class.
509
+ <https://www.w3.org/TR/webdriver/#actions>. For details, refer to the JS doc on
510
+ the `lib/input.Actions` class.
478
511
 
479
512
  As of January, 2018, only Firefox natively supports this new API. You can put the `Actions` class
480
513
  into "bridge mode" and it will attempt to translate mouse and keyboard actions to the legacy API (
481
- see class docs). Alternatively, you may continue to use the legacy API directly via the `lib/actions` module.
514
+ see class docs). Alternatively, you may continue to use the legacy API directly via
515
+ the `lib/actions` module.
482
516
  __NOTE:__ The legacy API is considered strongly deprecated and will be removed in a minor release
483
517
  once Google's Chrome and Microsoft's Edge browsers support the new API.
484
518
 
485
519
  * All window manipulation commands are now supported.
486
520
  * Added `driver.switchTo().parentFrame()`
487
- * When a named cookie is requested, attempt to fetch it directly using the W3C endpoint, `GET /session/{session id}/cookie/{name}`. If this command is not recognized by the
521
+ * When a named cookie is requested, attempt to fetch it directly using the W3C
522
+ endpoint, `GET /session/{session id}/cookie/{name}`. If this command is not recognized by the
488
523
  remote end, fallback to fetching all cookies and then searching for the desired name.
489
- * Replaced `WebElement.getSize()` and `WebElement.getLocation()` with a single method, `WebElement.getRect()`.
524
+ * Replaced `WebElement.getSize()` and `WebElement.getLocation()` with a single
525
+ method, `WebElement.getRect()`.
490
526
 
491
527
  ### API Changes
492
528
 
493
529
  * The core WebDriver API no longer uses promise manager
494
- * Removed `index.Builder#setControlFlow()`
495
- * The following thenable types no longer have a `cancel()` method:
496
- * The dynamically generated thenable WebDrivers created by `index.Builder`
497
- * `lib/webdriver.AlertPromise`
498
- * `lib/webdriver.WebElementPromise`
530
+ * Removed `index.Builder#setControlFlow()`
531
+ * The following thenable types no longer have a `cancel()` method:
532
+ * The dynamically generated thenable WebDrivers created by `index.Builder`
533
+ * `lib/webdriver.AlertPromise`
534
+ * `lib/webdriver.WebElementPromise`
499
535
  * Removed `remote/index.DriverService.prototype.stop()` (use `#kill()` instead)
500
536
  * Removed the `lib/actions` module
501
537
  * Removed the `lib/events` module
@@ -503,124 +539,127 @@ mode (see `example/headless.js`)
503
539
  * Removed the 'opera' module
504
540
  * Removed the promise manager from `lib/promise`, which includes the removal of the following
505
541
  exported names (replacements, if any, in parentheses):
506
- * CancellableThenable
507
- * CancellationError
508
- * ControlFlow
509
- * Deferred
510
- * LONG_STACK_TRACES
511
- * MultipleUnhandledRejectionError
512
- * Promise (use native Promises)
513
- * Resolver
514
- * Scheduler
515
- * Thenable
516
- * USE_PROMISE_MANAGER
517
- * all (use Promise.all)
518
- * asap (use Promise.resolve)
519
- * captureStackTrace (use Error.captureStackTrace)
520
- * consume (use async functions)
521
- * controlFlow
522
- * createPromise (use new Promise)
523
- * defer
524
- * fulfilled (use Promise.resolve)
525
- * isGenerator
526
- * rejected (use Promise.reject)
527
- * setDefaultFlow
528
- * when (use Promise.resolve)
542
+ * CancellableThenable
543
+ * CancellationError
544
+ * ControlFlow
545
+ * Deferred
546
+ * LONG_STACK_TRACES
547
+ * MultipleUnhandledRejectionError
548
+ * Promise (use native Promises)
549
+ * Resolver
550
+ * Scheduler
551
+ * Thenable
552
+ * USE_PROMISE_MANAGER
553
+ * all (use Promise.all)
554
+ * asap (use Promise.resolve)
555
+ * captureStackTrace (use Error.captureStackTrace)
556
+ * consume (use async functions)
557
+ * controlFlow
558
+ * createPromise (use new Promise)
559
+ * defer
560
+ * fulfilled (use Promise.resolve)
561
+ * isGenerator
562
+ * rejected (use Promise.reject)
563
+ * setDefaultFlow
564
+ * when (use Promise.resolve)
529
565
  * Changes to the `Builder` class:
530
- * Added setChromeService, setEdgeService, & setFirefoxService
531
- * Removed setEnableNativeEvents
532
- * Removed setScrollBehavior
566
+ * Added setChromeService, setEdgeService, & setFirefoxService
567
+ * Removed setEnableNativeEvents
568
+ * Removed setScrollBehavior
533
569
  * Changes to `chrome.Driver`
534
- * Added sendDevToolsCommand
535
- * Added setDownloadPath
570
+ * Added sendDevToolsCommand
571
+ * Added setDownloadPath
536
572
  * Changes to `chrome.Options`
537
- * Now extends the `Capabilities` class
538
- * Removed from/toCapabilities
573
+ * Now extends the `Capabilities` class
574
+ * Removed from/toCapabilities
539
575
  * Changes to `edge.Options`
540
- * Now extends the `Capabilities` class
541
- * Removed from/toCapabilities
576
+ * Now extends the `Capabilities` class
577
+ * Removed from/toCapabilities
542
578
  * Changes to `ie.Options`
543
- * Now extends the `Capabilities` class
544
- * Removed from/toCapabilities
545
- * Removed the `firefox.Binary` class. Custom binaries can still be selected using `firefox.Options#setBinary()`. Likewise, custom binary arguments can be specified
579
+ * Now extends the `Capabilities` class
580
+ * Removed from/toCapabilities
581
+ * Removed the `firefox.Binary` class. Custom binaries can still be selected
582
+ using `firefox.Options#setBinary()`. Likewise, custom binary arguments can be specified
546
583
  with `firefox.Options#addArguments()`.
547
584
  * Changes to `firefox.Driver`
548
- * Added installAddon(path)
549
- * Added uninstallAddon(id)
585
+ * Added installAddon(path)
586
+ * Added uninstallAddon(id)
550
587
  * Changes to `firefox.Options`
551
- * Now extends the `Capabilities` class
552
- * Removed from/toCapabilities
553
- * Removed setLoggingPreferences (was a no-op)
554
- * setProfile now only accepts a path to an existing profile
555
- * Added addExtensions
556
- * Added setPreference
557
- * Removed the `firefox.Profile` class. All of its functionality is now provided directly by `firefox.Options`
588
+ * Now extends the `Capabilities` class
589
+ * Removed from/toCapabilities
590
+ * Removed setLoggingPreferences (was a no-op)
591
+ * setProfile now only accepts a path to an existing profile
592
+ * Added addExtensions
593
+ * Added setPreference
594
+ * Removed the `firefox.Profile` class. All of its functionality is now provided directly
595
+ by `firefox.Options`
558
596
  * Removed the `firefox/binary` module
559
597
  * Removed the `firefox/profile` module
560
598
  * Changes to `safari.Options`
561
- * Now extends the `Capabilities` class
562
- * Removed from/toCapabilities
563
- * Removed setCleanSession (was a no-op)
599
+ * Now extends the `Capabilities` class
600
+ * Removed from/toCapabilities
601
+ * Removed setCleanSession (was a no-op)
564
602
  * Changes to `lib/capabilities.Browser`:
565
- * Removed several enum values.
566
- * ANDROID (use Chrome for Android; see docs on the chrome module)
567
- * IPAD (no support available)
568
- * IPHONE (no support available)
569
- * OPERA (use Chrome)
570
- * PHANTOM_JS (use Chrome or Firefox in headless mode)
571
- * HTMLUNIT (use Chrome or Firefox in headless mode)
603
+ * Removed several enum values.
604
+ * ANDROID (use Chrome for Android; see docs on the chrome module)
605
+ * IPAD (no support available)
606
+ * IPHONE (no support available)
607
+ * OPERA (use Chrome)
608
+ * PHANTOM_JS (use Chrome or Firefox in headless mode)
609
+ * HTMLUNIT (use Chrome or Firefox in headless mode)
572
610
  * Changes to `lib/capabilities.Capabilities`:
573
- * Removed static factory methods android(), ipad(), iphone(), opera(), phantomjs(), htmlunit(),
574
- and htmlunitwithjs(). Users can still manually configure capabilities for these, but their use
575
- is not recommended and they will no longer be surfaced in the API.
611
+ * Removed static factory methods android(), ipad(), iphone(), opera(), phantomjs(), htmlunit(),
612
+ and htmlunitwithjs(). Users can still manually configure capabilities for these, but their use
613
+ is not recommended and they will no longer be surfaced in the API.
576
614
  * Changes to `lib/error`:
577
- * Added
578
- * ElementClickInterceptedError
579
- * InsecureCertificateError
580
- * InvalidCoordinatesError
581
- * NoSuchCookieError
582
- * Removed
583
- * ElementNotVisibleError
584
- * InvalidElementCoordinatesError
615
+ * Added
616
+ * ElementClickInterceptedError
617
+ * InsecureCertificateError
618
+ * InvalidCoordinatesError
619
+ * NoSuchCookieError
620
+ * Removed
621
+ * ElementNotVisibleError
622
+ * InvalidElementCoordinatesError
585
623
  * Changes to `lib/webdriver.WebDriver`:
586
- * Dropped support for "requiredCapabilities" from WebDriver.createSession
587
- * actions() now returns the new `lib/input.Actions` class
588
- * Removed touchActions
589
- * Renamed schedule to execute
590
- * Removed the `WebDriver.attachToSession()` factory method. Users can just the `WebDriver`
591
- constructor directly instead.
592
- * Removed the `call()` method. This was used to inject custom function calls into the control
593
- 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
594
- call functions directly instead of through `driver.call()`.
624
+ * Dropped support for "requiredCapabilities" from WebDriver.createSession
625
+ * actions() now returns the new `lib/input.Actions` class
626
+ * Removed touchActions
627
+ * Renamed schedule to execute
628
+ * Removed the `WebDriver.attachToSession()` factory method. Users can just the `WebDriver`
629
+ constructor directly instead.
630
+ * Removed the `call()` method. This was used to inject custom function calls into the control
631
+ flow. Now that the promise manager is no longer used, this method is no longer necessary.
632
+ Users are now responsible for coordinating actions (ideally with async functions) and can just
633
+ call functions directly instead of through `driver.call()`.
595
634
  * Changes to `lib/webdriver.WebElement`:
596
- * Replaced getSize & getLocation with getRect
635
+ * Replaced getSize & getLocation with getRect
597
636
  * Changes to `lib/webdriver.Alert`:
598
- * Removed authenticateAs
637
+ * Removed authenticateAs
599
638
  * Changes to `lib/webdriver.Options` (`driver.manage()`):
600
- * Removed timeouts (use get/setTimeouts)
639
+ * Removed timeouts (use get/setTimeouts)
601
640
  * Changes to `lib/webdriver.Window` (`driver.manage().window()`):
602
- * Added
603
- * getRect
604
- * setRect
605
- * fullscreen
606
- * minimize
607
- * Removed (use the getRect/setRect methods)
608
- * getPosition
609
- * setPosition
610
- * getSize
611
- * setSize
641
+ * Added
642
+ * getRect
643
+ * setRect
644
+ * fullscreen
645
+ * minimize
646
+ * Removed (use the getRect/setRect methods)
647
+ * getPosition
648
+ * setPosition
649
+ * getSize
650
+ * setSize
612
651
  * Removed the `testing/assert` module
613
652
  * Changes to `testing/index`
614
- * Since the promise manager has been removed, it is no longer necessary to wrap the Mocha test
615
- hooks; instead, users can simply use async functions. The following have all been removed:
616
- * describe
617
- * before
618
- * beforeEach
619
- * after
620
- * afterEach
621
- * it
622
- * Added the `suite` function. For details, refer to the jsdoc or
623
- `example/google_search_test.js`
653
+ * Since the promise manager has been removed, it is no longer necessary to wrap the Mocha test
654
+ hooks; instead, users can simply use async functions. The following have all been removed:
655
+ * describe
656
+ * before
657
+ * beforeEach
658
+ * after
659
+ * afterEach
660
+ * it
661
+ * Added the `suite` function. For details, refer to the jsdoc or
662
+ `example/google_search_test.js`
624
663
 
625
664
  ## v3.6.0
626
665
 
@@ -636,18 +675,18 @@ mode (see `example/headless.js`)
636
675
  ### API Changes
637
676
 
638
677
  * Added new methods to `selenium-webdriver/firefox.Options`:
639
- * addArguments()
640
- * headless()
641
- * windowSize()
678
+ * addArguments()
679
+ * headless()
680
+ * windowSize()
642
681
  * Deprecated `selenium-webdriver/firefox/binary.Binary`
643
682
  * Removed `selenium-webdriver/firefox.Options#useGeckoDriver()`
644
683
  * Removed the unused `selenium-webdriver/firefox/profile.decode()`
645
684
  * Removed methods from `selenium-webdriver/firefox/profile.Profile` that had no effect since support
646
685
  for the legacy FirefoxDriver was dropped in 3.5.0:
647
- * setNativeEventsEnabled
648
- * nativeEventsEnabled
649
- * getPort
650
- * setPort
686
+ * setNativeEventsEnabled
687
+ * nativeEventsEnabled
688
+ * getPort
689
+ * setPort
651
690
  * Removed `selenium-webdriver/firefox.ServiceBuilder#setFirefoxBinary()`; custom binaries should be
652
691
  configured through the `firefox.Options` class.
653
692
  * Removed `selenium-webdriver/firefox.Capability`. These hold overs from the legacy FirefoxDriver
@@ -669,11 +708,12 @@ to a remote Selenium server that supports Firefox 45.
669
708
  ### Changes
670
709
 
671
710
  * Removed native support for Firefox 46 and older.
672
- * The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect.
673
- * `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated.
674
- * `selenium-webdriver/firefox.Options#useGeckoDriver()` is deprecated and now a no-op.
711
+ * The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect.
712
+ * `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated.
713
+ * `selenium-webdriver/firefox.Options#useGeckoDriver()` is deprecated and now a no-op.
675
714
  * `firefox.Options` will no longer discard the `"moz:firefoxOptions"` set in user provided
676
- capabilities (via `Builder.withCapabilities({})`). When both are used, the settings in `firefox.Options` will be applied _last_.
715
+ capabilities (via `Builder.withCapabilities({})`). When both are used, the settings
716
+ in `firefox.Options` will be applied _last_.
677
717
  * Added `chrome.Options#headless()` and `chrome.Options#windowSize()`, which may be used to start
678
718
  Chrome in headless mode (requires Chrome 59+) and to set the initial window size, respectively.
679
719
 
@@ -687,7 +727,8 @@ to a remote Selenium server that supports Firefox 45.
687
727
 
688
728
  ### Notice
689
729
 
690
- This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodriver/releases/tag/v0.15.0) or newer.
730
+ This release
731
+ requires [geckodriver 0.15.0](https://github.com/mozilla/geckodriver/releases/tag/v0.15.0) or newer.
691
732
 
692
733
  ### API Changes
693
734
 
@@ -726,7 +767,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
726
767
  ## v3.1.0
727
768
 
728
769
  * The `lib` package is once again platform agnostic (excluding `lib/devmode`).
729
- * Deprecated `promise.when(value, callback, errback)`. Use `promise.fulfilled(value).then(callback, errback)`
770
+ * Deprecated `promise.when(value, callback, errback)`.
771
+ Use `promise.fulfilled(value).then(callback, errback)`
730
772
  * Changed `promise.fulfilled(value)`, `promise.rejected(reason)` and
731
773
  `promise.defer()` to all use native promises when the promise manager is disabled.
732
774
  * Properly handle W3C error responses to new session commands.
@@ -743,9 +785,10 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
743
785
  ## v3.0.1
744
786
 
745
787
  * More API adjustments to align with native Promises
746
- * Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)`
747
- * Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)`
748
- * When a `wait()` condition times out, the returned promise will now be rejected with an `error.TimeoutError` instead of a generic `Error` object.
788
+ * Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)`
789
+ * Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)`
790
+ * When a `wait()` condition times out, the returned promise will now be rejected with
791
+ an `error.TimeoutError` instead of a generic `Error` object.
749
792
  * `WebDriver#wait()` will now throw a TypeError if an invalid wait condition is provided.
750
793
  * Properly catch unhandled promise rejections with an action sequence (only impacts when the promise
751
794
  manager is disabled).
@@ -772,17 +815,19 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
772
815
  `SELENIUM_PROMISE_MANAGER=0`. This is part of a larger plan to remove the promise manager, as
773
816
  documented at
774
817
  <https://github.com/SeleniumHQ/selenium/issues/2969>
775
- * When communicating with a W3C-compliant remote end, use the atoms library for the `WebElement.getAttribute()` and `WebElement.isDisplayed()` commands. This behavior is
818
+ * When communicating with a W3C-compliant remote end, use the atoms library for
819
+ the `WebElement.getAttribute()` and `WebElement.isDisplayed()` commands. This behavior is
776
820
  consistent with the java, .net, python, and ruby clients.
777
821
 
778
822
  ### API Changes
779
823
 
780
824
  * Removed `safari.Options#useLegacyDriver()`
781
825
  * Reduced the API on `promise.Thenable` for compatibility with native promises:
782
- * Removed `#isPending()`
783
- * Removed `#cancel()`
784
- * Removed `#finally()`
785
- * Changed all subclasses of `webdriver.WebDriver` to overload the static function `WebDriver.createSession()` instead of doing work in the constructor. All constructors
826
+ * Removed `#isPending()`
827
+ * Removed `#cancel()`
828
+ * Removed `#finally()`
829
+ * Changed all subclasses of `webdriver.WebDriver` to overload the static
830
+ function `WebDriver.createSession()` instead of doing work in the constructor. All constructors
786
831
  now inherit the base class' function signature. Users are still encouraged to use the `Builder`
787
832
  class instead of creating drivers directly.
788
833
  * `Builder#build()` now returns a "thenable" WebDriver instance, allowing users to immediately
@@ -795,8 +840,10 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
795
840
 
796
841
  * Fixed a bug where the promise manager would silently drop callbacks after recovering from an
797
842
  unhandled promise rejection.
798
- * Added the `firefox.ServiceBuilder` class, which may be used to customize the geckodriver used for `firefox.Driver` instances.
799
- * Added support for Safari 10 safaridriver. safaridriver may be disabled via tha API, `safari.Options#useLegacyDriver`, to use the safari extension driver.
843
+ * Added the `firefox.ServiceBuilder` class, which may be used to customize the geckodriver used
844
+ for `firefox.Driver` instances.
845
+ * Added support for Safari 10 safaridriver. safaridriver may be disabled via tha
846
+ API, `safari.Options#useLegacyDriver`, to use the safari extension driver.
800
847
  * Updated the `lib/proxy` module to support configuring a SOCKS proxy.
801
848
  * For the `promise.ControlFlow`, fire the "uncaughtException" event in a new turn of the JS event
802
849
  loop. As a result of this change, any errors thrown by an event listener will propagate to the
@@ -820,7 +867,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
820
867
 
821
868
  ### Changes for W3C WebDriver Spec Compliance
822
869
 
823
- * Updated command mappings for [getting](https://w3c.github.io/webdriver/webdriver-spec.html#get-window-position)
870
+ * Updated command mappings
871
+ for [getting](https://w3c.github.io/webdriver/webdriver-spec.html#get-window-position)
824
872
  and [setting](https://w3c.github.io/webdriver/webdriver-spec.html#set-window-position)
825
873
  the window position.
826
874
 
@@ -847,7 +895,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
847
895
  * Properly configure proxies when using the geckodriver
848
896
  * `http.Executor` now accepts a promised client. The `builder.Builder` class will now use this
849
897
  instead of a `command.DeferredExecutor` when creating WebDriver instances.
850
- * For Chrome and Firefox, the `builder.Builder` class will always return an instanceof `chrome.Driver` and `firefox.Driver`, respectively, even when configured to use a
898
+ * For Chrome and Firefox, the `builder.Builder` class will always return an
899
+ instanceof `chrome.Driver` and `firefox.Driver`, respectively, even when configured to use a
851
900
  remote server (from `builder.Builder#usingServer(url)`,
852
901
  `SELENIUM_REMOTE_URL`, etc).
853
902
 
@@ -860,32 +909,32 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
860
909
  _seconds_ since epoch. When retrieving cookies, the expiration is always returned in seconds.
861
910
  * Renamed `firefox.Options#useMarionette` to `firefox.Options#useGeckoDriver`
862
911
  * Removed deprecated modules:
863
- * `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\
864
- or the `error` property exported by `selenium-webdriver`)
865
- * `selenium-webdriver/executors` — this was not previously deprecated, but is no longer used.
912
+ * `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\
913
+ or the `error` property exported by `selenium-webdriver`)
914
+ * `selenium-webdriver/executors` — this was not previously deprecated, but is no longer used.
866
915
  * Removed deprecated types:
867
- * `command.DeferredExecutor` — this was not previously deprecated, but is no longer used. It can
868
- be trivially implemented by clients should it be needed.
869
- * `error.InvalidSessionIdError` (use `error.NoSuchSessionError`)
870
- * `executors.DeferredExecutor`
871
- * `until.Condition` (use `webdriver.Condition`)
872
- * `until.WebElementCondition` (use `webdriver.WebElementCondition`)
873
- * `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`)
916
+ * `command.DeferredExecutor` — this was not previously deprecated, but is no longer used. It can
917
+ be trivially implemented by clients should it be needed.
918
+ * `error.InvalidSessionIdError` (use `error.NoSuchSessionError`)
919
+ * `executors.DeferredExecutor`
920
+ * `until.Condition` (use `webdriver.Condition`)
921
+ * `until.WebElementCondition` (use `webdriver.WebElementCondition`)
922
+ * `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`)
874
923
  * Removed deprecated functions:
875
- * `Deferred#cancel()`
876
- * `Deferred#catch()`
877
- * `Deferred#finally()`
878
- * `Deferred#isPending()`
879
- * `Deferred#then()`
880
- * `Promise#thenCatch()`
881
- * `Promise#thenFinally()`
882
- * `WebDriver#isElementPresent()`
883
- * `WebElement#getInnerHtml()`
884
- * `WebElement#getOuterHtml()`
885
- * `WebElement#getRawId()`
886
- * `WebElement#isElementPresent()`
924
+ * `Deferred#cancel()`
925
+ * `Deferred#catch()`
926
+ * `Deferred#finally()`
927
+ * `Deferred#isPending()`
928
+ * `Deferred#then()`
929
+ * `Promise#thenCatch()`
930
+ * `Promise#thenFinally()`
931
+ * `WebDriver#isElementPresent()`
932
+ * `WebElement#getInnerHtml()`
933
+ * `WebElement#getOuterHtml()`
934
+ * `WebElement#getRawId()`
935
+ * `WebElement#isElementPresent()`
887
936
  * Removed deprecated properties:
888
- * `WebDriverError#code`
937
+ * `WebDriverError#code`
889
938
 
890
939
  ## v2.53.2
891
940
 
@@ -909,7 +958,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
909
958
  Marionette may be enabled via the API,
910
959
  `firefox.Options#useMarionette`, or by setting the `SELENIUM_MARIONETTE`
911
960
  environment variable.
912
- * Moved all logic for parsing and interpreting responses from the remote end into the individual `command.Executor` implementations.
961
+ * Moved all logic for parsing and interpreting responses from the remote end into the
962
+ individual `command.Executor` implementations.
913
963
  * For consistency with the other Selenium language bindings,
914
964
  `WebDriver#isElementPresent()` and `WebElement#isElementPresent()` have been deprecated. These
915
965
  methods will be removed in v3.0. Use the findElements command to test for the presence of an
@@ -931,7 +981,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
931
981
  * FIXED: `io.findInPath()` will no longer match against directories that have the same basename as
932
982
  the target file.
933
983
  * FIXED: `phantomjs.Driver` now takes a third argument that defines the path to a log file to use
934
- for the phantomjs executable's output. This may be quickly set at runtime with the `SELENIUM_PHANTOMJS_LOG` environment variable.
984
+ for the phantomjs executable's output. This may be quickly set at runtime with
985
+ the `SELENIUM_PHANTOMJS_LOG` environment variable.
935
986
 
936
987
  ### Changes for W3C WebDriver Spec Compliance
937
988
 
@@ -969,8 +1020,10 @@ the selenium-webdriver package README.
969
1020
  (Map semantics). To check whether the value is true, use `get(key)`.
970
1021
  * Deprecated `executors.DeferredExecutor` in favor of
971
1022
  `lib/command.DeferredExecutor`.
972
- * API documentation is no longer distributed with the npm package, but remains available at <http://seleniumhq.github.io/selenium/docs/api/javascript/>
973
- * Rewrote the `error` module to export an Error subtype for each type of error defined in the [W3C WebDriver spec](https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors).
1023
+ * API documentation is no longer distributed with the npm package, but remains available
1024
+ at <http://seleniumhq.github.io/selenium/docs/api/javascript/>
1025
+ * Rewrote the `error` module to export an Error subtype for each type of error defined in
1026
+ the [W3C WebDriver spec](https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors).
974
1027
  * Changed the `http.Request` and `http.Response` classes to store headers in maps instead of object
975
1028
  literals.
976
1029
  * Updated `ws` dependency to version `1.0.1`.
@@ -983,7 +1036,8 @@ the selenium-webdriver package README.
983
1036
 
984
1037
  ### Changes for W3C WebDriver Spec Compliance
985
1038
 
986
- * Updated the `By` locators that are not in the W3C spec to delegated to using CSS selectors: `By.className`, `By.id`, `By.name`, and `By.tagName`.
1039
+ * Updated the `By` locators that are not in the W3C spec to delegated to using CSS
1040
+ selectors: `By.className`, `By.id`, `By.name`, and `By.tagName`.
987
1041
 
988
1042
  ## v2.49-51
989
1043
 
@@ -1007,7 +1061,8 @@ the selenium-webdriver package README.
1007
1061
  version
1008
1062
  `2.1.1`.
1009
1063
  * FIXED: the `webdriver.promise.ControlFlow` now has a consistent execution order for
1010
- tasks/callbacks scheduled in different turns of the JS event loop. Refer to the `webdriver.promise` documentation for more details.
1064
+ tasks/callbacks scheduled in different turns of the JS event loop. Refer to
1065
+ the `webdriver.promise` documentation for more details.
1011
1066
  * FIXED: do not drop user auth from the WebDriver server URL.
1012
1067
  * FIXED: a single `firefox.Binary` instance may be used to configure and launch multiple
1013
1068
  FirefoxDriver sessions.
@@ -1037,7 +1092,7 @@ continue to be supported, but will require setting the `--harmony` flag.
1037
1092
  ### Change Summary
1038
1093
 
1039
1094
  * Add support for [Node v4.0.0](https://nodejs.org/en/blog/release/v4.0.0/)
1040
- * Updated `ws` dependency from `0.7.1` to `0.8.0`
1095
+ * Updated `ws` dependency from `0.7.1` to `0.8.0`
1041
1096
  * Bumped the minimum supported version of Node from `0.10.x` to `0.12.x`. This is in accordance with
1042
1097
  the Node support policy established in `v2.45.0`.
1043
1098
 
@@ -1054,14 +1109,14 @@ continue to be supported, but will require setting the `--harmony` flag.
1054
1109
  * Added support for using a proxy server for WebDriver commands. See `Builder#usingWebDriverProxy()`
1055
1110
  for more info.
1056
1111
  * Removed deprecated functions:
1057
- * Capabilities#toJSON()
1058
- * UnhandledAlertError#getAlert()
1059
- * chrome.createDriver()
1060
- * phantomjs.createDriver()
1061
- * promise.ControlFlow#annotateError()
1062
- * promise.ControlFlow#await()
1063
- * promise.ControlFlow#clearHistory()
1064
- * promise.ControlFlow#getHistory()
1112
+ * Capabilities#toJSON()
1113
+ * UnhandledAlertError#getAlert()
1114
+ * chrome.createDriver()
1115
+ * phantomjs.createDriver()
1116
+ * promise.ControlFlow#annotateError()
1117
+ * promise.ControlFlow#await()
1118
+ * promise.ControlFlow#clearHistory()
1119
+ * promise.ControlFlow#getHistory()
1065
1120
  * Removed deprecated enum values: `ErrorCode.NO_MODAL_DIALOG_OPEN` and
1066
1121
  `ErrorCode.MODAL_DIALOG_OPENED`. Use `ErrorCode.NO_SUCH_ALERT` and
1067
1122
  `ErrorCode.UNEXPECTED_ALERT_OPEN`, respectively.
@@ -1085,7 +1140,8 @@ continue to be supported, but will require setting the `--harmony` flag.
1085
1140
  * FIXED: 8548: Task callbacks are once again dropped if the task was cancelled due to a previously
1086
1141
  uncaught error within the frame.
1087
1142
  * FIXED: 8496: Extended the `chrome.Options` API to cover all configuration options (e.g. mobile
1088
- emulation and performance logging) documented on the ChromeDriver [project site](https://chromedriver.chromium.org/capabilities).
1143
+ emulation and performance logging) documented on the
1144
+ ChromeDriver [project site](https://chromedriver.chromium.org/capabilities).
1089
1145
 
1090
1146
  ## v2.45.0
1091
1147
 
@@ -1160,7 +1216,8 @@ major version release (i.e. 1.0.0).
1160
1216
  * Expanded the interactions API to include touch actions. See `WebDriver.touchActions()`.
1161
1217
  * FIXED: 8380: `firefox.Driver` will delete its temporary profile on `quit`.
1162
1218
  * FIXED: 8306: Stack overflow in promise callbacks eliminated.
1163
- * FIXED: 8221: Added support for defining custom command mappings. Includes support for PhantomJS's `executePhantomJS` (requires PhantomJS 1.9.7 or GhostDriver 1.1.0).
1219
+ * FIXED: 8221: Added support for defining custom command mappings. Includes support for
1220
+ PhantomJS's `executePhantomJS` (requires PhantomJS 1.9.7 or GhostDriver 1.1.0).
1164
1221
  * FIXED: 8128: When the FirefoxDriver marshals an object to the page for
1165
1222
  `executeScript`, it defines additional properties (required by the driver's implementation). These
1166
1223
  properties will no longer be enumerable and should be omitted (i.e. they won't show up in
@@ -1363,14 +1420,14 @@ major version release (i.e. 1.0.0).
1363
1420
  * For Promises/A+ compatibility, backing out the change in 2.30.0 that ensured rejections were
1364
1421
  always Error objects. Rejection reasons are now left as is.
1365
1422
  * Removed deprecated functions originally scheduled for removal in 2.31.0
1366
- * promise.Application.getInstance()
1367
- * promise.ControlFlow#schedule()
1368
- * promise.ControlFlow#scheduleTimeout()
1369
- * promise.ControlFlow#scheduleWait()
1423
+ * promise.Application.getInstance()
1424
+ * promise.ControlFlow#schedule()
1425
+ * promise.ControlFlow#scheduleTimeout()
1426
+ * promise.ControlFlow#scheduleWait()
1370
1427
  * Renamed some functions for consistency with Promises/A+ terminology. The original functions have
1371
1428
  been deprecated and will be removed in 2.34.0:
1372
- * promise.resolved() -> promise.fulfilled()
1373
- * promise.Deferred#resolve() -> promise.Deferred#fulfill()
1429
+ * promise.resolved() -> promise.fulfilled()
1430
+ * promise.Deferred#resolve() -> promise.Deferred#fulfill()
1374
1431
  * FIXED: remote.SeleniumServer#stop now shuts down within the active control flow, allowing scripts
1375
1432
  to finish. Use #kill to shutdown immediately.
1376
1433
  * FIXED: 5321: cookie deletion commands