selenium-webdriver 4.17.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 (59) hide show
  1. package/CHANGES.md +236 -196
  2. package/bidi/addInterceptParameters.js +86 -0
  3. package/bidi/browsingContext.js +144 -37
  4. package/bidi/browsingContextInspector.js +13 -40
  5. package/bidi/evaluateResult.js +4 -10
  6. package/bidi/filterBy.js +2 -6
  7. package/bidi/index.js +31 -29
  8. package/bidi/input.js +1 -4
  9. package/bidi/interceptPhase.js +24 -0
  10. package/bidi/logInspector.js +15 -20
  11. package/bidi/network.js +178 -0
  12. package/bidi/networkInspector.js +8 -2
  13. package/bidi/networkTypes.js +22 -49
  14. package/bidi/protocolType.js +3 -9
  15. package/bidi/protocolValue.js +6 -25
  16. package/bidi/realmInfo.js +2 -10
  17. package/bidi/scriptManager.js +20 -59
  18. package/bidi/urlPattern.js +58 -0
  19. package/bin/linux/selenium-manager +0 -0
  20. package/bin/macos/selenium-manager +0 -0
  21. package/bin/windows/selenium-manager.exe +0 -0
  22. package/chrome.js +1 -8
  23. package/chromium.js +27 -109
  24. package/common/driverFinder.js +1 -1
  25. package/common/seleniumManager.js +9 -18
  26. package/devtools/CDPConnection.js +1 -3
  27. package/edge.js +1 -3
  28. package/example/chrome_android.js +2 -5
  29. package/example/chrome_mobile_emulation.js +2 -4
  30. package/example/google_search.js +1 -3
  31. package/example/headless.js +4 -10
  32. package/example/logging.js +3 -9
  33. package/firefox.js +55 -109
  34. package/http/index.js +7 -10
  35. package/ie.js +5 -15
  36. package/index.js +7 -29
  37. package/io/exec.js +1 -2
  38. package/io/index.js +3 -3
  39. package/io/zip.js +8 -30
  40. package/lib/by.js +2 -9
  41. package/lib/capabilities.js +3 -9
  42. package/lib/command.js +3 -3
  43. package/lib/error.js +2 -9
  44. package/lib/http.js +34 -131
  45. package/lib/input.js +10 -34
  46. package/lib/logging.js +3 -11
  47. package/lib/promise.js +2 -7
  48. package/lib/select.js +3 -9
  49. package/lib/until.js +28 -49
  50. package/lib/util.js +1 -4
  51. package/lib/virtual_authenticator.js +4 -22
  52. package/lib/webdriver.js +118 -297
  53. package/lib/webelement.js +1 -5
  54. package/net/index.js +1 -4
  55. package/package.json +2 -1
  56. package/remote/index.js +9 -24
  57. package/remote/util.js +6 -19
  58. package/safari.js +3 -8
  59. package/testing/index.js +6 -11
package/CHANGES.md CHANGED
@@ -1,3 +1,16 @@
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
+
1
14
  ## 4.17.0
2
15
 
3
16
  * Add javascript to Selenium Manager input for tracking (see #13288)
@@ -26,7 +39,6 @@
26
39
 
27
40
  * Add CDP v120 and remove v117
28
41
 
29
-
30
42
  ## 4.15.0
31
43
 
32
44
  #### :bug: Bug fix
@@ -54,7 +66,7 @@
54
66
  #### :nail_care: Polish
55
67
 
56
68
  * Adding CDP v117 and removing v114
57
- * Added file location to exception message for Selenium Manager
69
+ * Added file location to exception message for Selenium Manager
58
70
 
59
71
  #### :rocket: New Feature
60
72
 
@@ -248,15 +260,15 @@ fix: iedriver download with selenium-manager #11579
248
260
  #### :rocket: New Feature
249
261
 
250
262
  * Adds 'Select' support package
251
- * selectByIndex
252
- * selectByValue
253
- * selectByVisibleText
254
- * getAllSelectedOptions
255
- * getFirstSelectedOption
256
- * deselectAll
257
- * deselectByVisibleText
258
- * deselectByIndex
259
- * deselectByValue
263
+ * selectByIndex
264
+ * selectByValue
265
+ * selectByVisibleText
266
+ * getAllSelectedOptions
267
+ * getFirstSelectedOption
268
+ * deselectAll
269
+ * deselectByVisibleText
270
+ * deselectByIndex
271
+ * deselectByValue
260
272
  * Add support for Actions API sendKeys to designated element
261
273
  * Adds mouse button enum for forward and backward navigation
262
274
 
@@ -264,7 +276,8 @@ fix: iedriver download with selenium-manager #11579
264
276
 
265
277
  * Set min node support to 14.x.x (issue 1 in #10970)
266
278
  * fix: geckodriver session with node 18.x.x (issue 2 in #10970)
267
- * 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))
268
281
  * fix: "SetExperimental" option is not available in webdriverjs (Javascript/Typescript) (#10959)
269
282
  * fix: Do not allow Select class to select disabled options (#10812)
270
283
 
@@ -334,7 +347,8 @@ fix: iedriver download with selenium-manager #11579
334
347
  * ignore errors arising from trying to use file detector fixes #6343
335
348
  * Added RelativeBy class on the main api (#10148)
336
349
  * Code cleanup and minor improvements
337
- * 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
338
352
  * Remove legacy JWP support and w3c<boolean> switch (#10095)
339
353
  * update map/filter clean up to common format (#10094)
340
354
 
@@ -417,7 +431,7 @@ fix: iedriver download with selenium-manager #11579
417
431
  ## v4.0.0-beta.1
418
432
 
419
433
  * JS Binding support for WebDriver Bidi in Firefox
420
- * 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
421
435
  * Update the supported CDP versions
422
436
  * Update tmp package version (#9155)
423
437
  * Adding support for /computedlabel (getAccessibleName) (#9073)
@@ -431,11 +445,12 @@ fix: iedriver download with selenium-manager #11579
431
445
 
432
446
  * Rolling back native support for Opera Browser
433
447
  * Added new ieOptions capabilities:
434
- * fileUploadDialogTimeout
435
- * setEdgePath
436
- * setEdgeChromium
437
- * setScrollBehavior
438
- * 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)`
439
454
 
440
455
  * Added relative locators
441
456
  * Added Chrome DevTools Protocol (CDP) support
@@ -491,28 +506,32 @@ mode (see `example/headless.js`)
491
506
  ### Changes for W3C WebDriver Spec Compliance
492
507
 
493
508
  * Revamped the actions API to conform with the WebDriver Spec:
494
- <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.
495
511
 
496
512
  As of January, 2018, only Firefox natively supports this new API. You can put the `Actions` class
497
513
  into "bridge mode" and it will attempt to translate mouse and keyboard actions to the legacy API (
498
- 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.
499
516
  __NOTE:__ The legacy API is considered strongly deprecated and will be removed in a minor release
500
517
  once Google's Chrome and Microsoft's Edge browsers support the new API.
501
518
 
502
519
  * All window manipulation commands are now supported.
503
520
  * Added `driver.switchTo().parentFrame()`
504
- * 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
505
523
  remote end, fallback to fetching all cookies and then searching for the desired name.
506
- * 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()`.
507
526
 
508
527
  ### API Changes
509
528
 
510
529
  * The core WebDriver API no longer uses promise manager
511
- * Removed `index.Builder#setControlFlow()`
512
- * The following thenable types no longer have a `cancel()` method:
513
- * The dynamically generated thenable WebDrivers created by `index.Builder`
514
- * `lib/webdriver.AlertPromise`
515
- * `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`
516
535
  * Removed `remote/index.DriverService.prototype.stop()` (use `#kill()` instead)
517
536
  * Removed the `lib/actions` module
518
537
  * Removed the `lib/events` module
@@ -520,124 +539,127 @@ mode (see `example/headless.js`)
520
539
  * Removed the 'opera' module
521
540
  * Removed the promise manager from `lib/promise`, which includes the removal of the following
522
541
  exported names (replacements, if any, in parentheses):
523
- * CancellableThenable
524
- * CancellationError
525
- * ControlFlow
526
- * Deferred
527
- * LONG_STACK_TRACES
528
- * MultipleUnhandledRejectionError
529
- * Promise (use native Promises)
530
- * Resolver
531
- * Scheduler
532
- * Thenable
533
- * USE_PROMISE_MANAGER
534
- * all (use Promise.all)
535
- * asap (use Promise.resolve)
536
- * captureStackTrace (use Error.captureStackTrace)
537
- * consume (use async functions)
538
- * controlFlow
539
- * createPromise (use new Promise)
540
- * defer
541
- * fulfilled (use Promise.resolve)
542
- * isGenerator
543
- * rejected (use Promise.reject)
544
- * setDefaultFlow
545
- * 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)
546
565
  * Changes to the `Builder` class:
547
- * Added setChromeService, setEdgeService, & setFirefoxService
548
- * Removed setEnableNativeEvents
549
- * Removed setScrollBehavior
566
+ * Added setChromeService, setEdgeService, & setFirefoxService
567
+ * Removed setEnableNativeEvents
568
+ * Removed setScrollBehavior
550
569
  * Changes to `chrome.Driver`
551
- * Added sendDevToolsCommand
552
- * Added setDownloadPath
570
+ * Added sendDevToolsCommand
571
+ * Added setDownloadPath
553
572
  * Changes to `chrome.Options`
554
- * Now extends the `Capabilities` class
555
- * Removed from/toCapabilities
573
+ * Now extends the `Capabilities` class
574
+ * Removed from/toCapabilities
556
575
  * Changes to `edge.Options`
557
- * Now extends the `Capabilities` class
558
- * Removed from/toCapabilities
576
+ * Now extends the `Capabilities` class
577
+ * Removed from/toCapabilities
559
578
  * Changes to `ie.Options`
560
- * Now extends the `Capabilities` class
561
- * Removed from/toCapabilities
562
- * 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
563
583
  with `firefox.Options#addArguments()`.
564
584
  * Changes to `firefox.Driver`
565
- * Added installAddon(path)
566
- * Added uninstallAddon(id)
585
+ * Added installAddon(path)
586
+ * Added uninstallAddon(id)
567
587
  * Changes to `firefox.Options`
568
- * Now extends the `Capabilities` class
569
- * Removed from/toCapabilities
570
- * Removed setLoggingPreferences (was a no-op)
571
- * setProfile now only accepts a path to an existing profile
572
- * Added addExtensions
573
- * Added setPreference
574
- * 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`
575
596
  * Removed the `firefox/binary` module
576
597
  * Removed the `firefox/profile` module
577
598
  * Changes to `safari.Options`
578
- * Now extends the `Capabilities` class
579
- * Removed from/toCapabilities
580
- * Removed setCleanSession (was a no-op)
599
+ * Now extends the `Capabilities` class
600
+ * Removed from/toCapabilities
601
+ * Removed setCleanSession (was a no-op)
581
602
  * Changes to `lib/capabilities.Browser`:
582
- * Removed several enum values.
583
- * ANDROID (use Chrome for Android; see docs on the chrome module)
584
- * IPAD (no support available)
585
- * IPHONE (no support available)
586
- * OPERA (use Chrome)
587
- * PHANTOM_JS (use Chrome or Firefox in headless mode)
588
- * 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)
589
610
  * Changes to `lib/capabilities.Capabilities`:
590
- * Removed static factory methods android(), ipad(), iphone(), opera(), phantomjs(), htmlunit(),
591
- and htmlunitwithjs(). Users can still manually configure capabilities for these, but their use
592
- 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.
593
614
  * Changes to `lib/error`:
594
- * Added
595
- * ElementClickInterceptedError
596
- * InsecureCertificateError
597
- * InvalidCoordinatesError
598
- * NoSuchCookieError
599
- * Removed
600
- * ElementNotVisibleError
601
- * InvalidElementCoordinatesError
615
+ * Added
616
+ * ElementClickInterceptedError
617
+ * InsecureCertificateError
618
+ * InvalidCoordinatesError
619
+ * NoSuchCookieError
620
+ * Removed
621
+ * ElementNotVisibleError
622
+ * InvalidElementCoordinatesError
602
623
  * Changes to `lib/webdriver.WebDriver`:
603
- * Dropped support for "requiredCapabilities" from WebDriver.createSession
604
- * actions() now returns the new `lib/input.Actions` class
605
- * Removed touchActions
606
- * Renamed schedule to execute
607
- * Removed the `WebDriver.attachToSession()` factory method. Users can just the `WebDriver`
608
- constructor directly instead.
609
- * Removed the `call()` method. This was used to inject custom function calls into the control
610
- 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
611
- 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()`.
612
634
  * Changes to `lib/webdriver.WebElement`:
613
- * Replaced getSize & getLocation with getRect
635
+ * Replaced getSize & getLocation with getRect
614
636
  * Changes to `lib/webdriver.Alert`:
615
- * Removed authenticateAs
637
+ * Removed authenticateAs
616
638
  * Changes to `lib/webdriver.Options` (`driver.manage()`):
617
- * Removed timeouts (use get/setTimeouts)
639
+ * Removed timeouts (use get/setTimeouts)
618
640
  * Changes to `lib/webdriver.Window` (`driver.manage().window()`):
619
- * Added
620
- * getRect
621
- * setRect
622
- * fullscreen
623
- * minimize
624
- * Removed (use the getRect/setRect methods)
625
- * getPosition
626
- * setPosition
627
- * getSize
628
- * 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
629
651
  * Removed the `testing/assert` module
630
652
  * Changes to `testing/index`
631
- * Since the promise manager has been removed, it is no longer necessary to wrap the Mocha test
632
- hooks; instead, users can simply use async functions. The following have all been removed:
633
- * describe
634
- * before
635
- * beforeEach
636
- * after
637
- * afterEach
638
- * it
639
- * Added the `suite` function. For details, refer to the jsdoc or
640
- `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`
641
663
 
642
664
  ## v3.6.0
643
665
 
@@ -653,18 +675,18 @@ mode (see `example/headless.js`)
653
675
  ### API Changes
654
676
 
655
677
  * Added new methods to `selenium-webdriver/firefox.Options`:
656
- * addArguments()
657
- * headless()
658
- * windowSize()
678
+ * addArguments()
679
+ * headless()
680
+ * windowSize()
659
681
  * Deprecated `selenium-webdriver/firefox/binary.Binary`
660
682
  * Removed `selenium-webdriver/firefox.Options#useGeckoDriver()`
661
683
  * Removed the unused `selenium-webdriver/firefox/profile.decode()`
662
684
  * Removed methods from `selenium-webdriver/firefox/profile.Profile` that had no effect since support
663
685
  for the legacy FirefoxDriver was dropped in 3.5.0:
664
- * setNativeEventsEnabled
665
- * nativeEventsEnabled
666
- * getPort
667
- * setPort
686
+ * setNativeEventsEnabled
687
+ * nativeEventsEnabled
688
+ * getPort
689
+ * setPort
668
690
  * Removed `selenium-webdriver/firefox.ServiceBuilder#setFirefoxBinary()`; custom binaries should be
669
691
  configured through the `firefox.Options` class.
670
692
  * Removed `selenium-webdriver/firefox.Capability`. These hold overs from the legacy FirefoxDriver
@@ -686,11 +708,12 @@ to a remote Selenium server that supports Firefox 45.
686
708
  ### Changes
687
709
 
688
710
  * Removed native support for Firefox 46 and older.
689
- * The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect.
690
- * `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated.
691
- * `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.
692
714
  * `firefox.Options` will no longer discard the `"moz:firefoxOptions"` set in user provided
693
- 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_.
694
717
  * Added `chrome.Options#headless()` and `chrome.Options#windowSize()`, which may be used to start
695
718
  Chrome in headless mode (requires Chrome 59+) and to set the initial window size, respectively.
696
719
 
@@ -704,7 +727,8 @@ to a remote Selenium server that supports Firefox 45.
704
727
 
705
728
  ### Notice
706
729
 
707
- 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.
708
732
 
709
733
  ### API Changes
710
734
 
@@ -743,7 +767,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
743
767
  ## v3.1.0
744
768
 
745
769
  * The `lib` package is once again platform agnostic (excluding `lib/devmode`).
746
- * 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)`
747
772
  * Changed `promise.fulfilled(value)`, `promise.rejected(reason)` and
748
773
  `promise.defer()` to all use native promises when the promise manager is disabled.
749
774
  * Properly handle W3C error responses to new session commands.
@@ -760,9 +785,10 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
760
785
  ## v3.0.1
761
786
 
762
787
  * More API adjustments to align with native Promises
763
- * Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)`
764
- * Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)`
765
- * 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.
766
792
  * `WebDriver#wait()` will now throw a TypeError if an invalid wait condition is provided.
767
793
  * Properly catch unhandled promise rejections with an action sequence (only impacts when the promise
768
794
  manager is disabled).
@@ -789,17 +815,19 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
789
815
  `SELENIUM_PROMISE_MANAGER=0`. This is part of a larger plan to remove the promise manager, as
790
816
  documented at
791
817
  <https://github.com/SeleniumHQ/selenium/issues/2969>
792
- * 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
793
820
  consistent with the java, .net, python, and ruby clients.
794
821
 
795
822
  ### API Changes
796
823
 
797
824
  * Removed `safari.Options#useLegacyDriver()`
798
825
  * Reduced the API on `promise.Thenable` for compatibility with native promises:
799
- * Removed `#isPending()`
800
- * Removed `#cancel()`
801
- * Removed `#finally()`
802
- * 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
803
831
  now inherit the base class' function signature. Users are still encouraged to use the `Builder`
804
832
  class instead of creating drivers directly.
805
833
  * `Builder#build()` now returns a "thenable" WebDriver instance, allowing users to immediately
@@ -812,8 +840,10 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
812
840
 
813
841
  * Fixed a bug where the promise manager would silently drop callbacks after recovering from an
814
842
  unhandled promise rejection.
815
- * Added the `firefox.ServiceBuilder` class, which may be used to customize the geckodriver used for `firefox.Driver` instances.
816
- * 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.
817
847
  * Updated the `lib/proxy` module to support configuring a SOCKS proxy.
818
848
  * For the `promise.ControlFlow`, fire the "uncaughtException" event in a new turn of the JS event
819
849
  loop. As a result of this change, any errors thrown by an event listener will propagate to the
@@ -837,7 +867,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
837
867
 
838
868
  ### Changes for W3C WebDriver Spec Compliance
839
869
 
840
- * 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)
841
872
  and [setting](https://w3c.github.io/webdriver/webdriver-spec.html#set-window-position)
842
873
  the window position.
843
874
 
@@ -864,7 +895,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
864
895
  * Properly configure proxies when using the geckodriver
865
896
  * `http.Executor` now accepts a promised client. The `builder.Builder` class will now use this
866
897
  instead of a `command.DeferredExecutor` when creating WebDriver instances.
867
- * 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
868
900
  remote server (from `builder.Builder#usingServer(url)`,
869
901
  `SELENIUM_REMOTE_URL`, etc).
870
902
 
@@ -877,32 +909,32 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
877
909
  _seconds_ since epoch. When retrieving cookies, the expiration is always returned in seconds.
878
910
  * Renamed `firefox.Options#useMarionette` to `firefox.Options#useGeckoDriver`
879
911
  * Removed deprecated modules:
880
- * `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\
881
- or the `error` property exported by `selenium-webdriver`)
882
- * `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.
883
915
  * Removed deprecated types:
884
- * `command.DeferredExecutor` — this was not previously deprecated, but is no longer used. It can
885
- be trivially implemented by clients should it be needed.
886
- * `error.InvalidSessionIdError` (use `error.NoSuchSessionError`)
887
- * `executors.DeferredExecutor`
888
- * `until.Condition` (use `webdriver.Condition`)
889
- * `until.WebElementCondition` (use `webdriver.WebElementCondition`)
890
- * `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`)
891
923
  * Removed deprecated functions:
892
- * `Deferred#cancel()`
893
- * `Deferred#catch()`
894
- * `Deferred#finally()`
895
- * `Deferred#isPending()`
896
- * `Deferred#then()`
897
- * `Promise#thenCatch()`
898
- * `Promise#thenFinally()`
899
- * `WebDriver#isElementPresent()`
900
- * `WebElement#getInnerHtml()`
901
- * `WebElement#getOuterHtml()`
902
- * `WebElement#getRawId()`
903
- * `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()`
904
936
  * Removed deprecated properties:
905
- * `WebDriverError#code`
937
+ * `WebDriverError#code`
906
938
 
907
939
  ## v2.53.2
908
940
 
@@ -926,7 +958,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
926
958
  Marionette may be enabled via the API,
927
959
  `firefox.Options#useMarionette`, or by setting the `SELENIUM_MARIONETTE`
928
960
  environment variable.
929
- * 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.
930
963
  * For consistency with the other Selenium language bindings,
931
964
  `WebDriver#isElementPresent()` and `WebElement#isElementPresent()` have been deprecated. These
932
965
  methods will be removed in v3.0. Use the findElements command to test for the presence of an
@@ -948,7 +981,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
948
981
  * FIXED: `io.findInPath()` will no longer match against directories that have the same basename as
949
982
  the target file.
950
983
  * FIXED: `phantomjs.Driver` now takes a third argument that defines the path to a log file to use
951
- 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.
952
986
 
953
987
  ### Changes for W3C WebDriver Spec Compliance
954
988
 
@@ -986,8 +1020,10 @@ the selenium-webdriver package README.
986
1020
  (Map semantics). To check whether the value is true, use `get(key)`.
987
1021
  * Deprecated `executors.DeferredExecutor` in favor of
988
1022
  `lib/command.DeferredExecutor`.
989
- * API documentation is no longer distributed with the npm package, but remains available at <http://seleniumhq.github.io/selenium/docs/api/javascript/>
990
- * 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).
991
1027
  * Changed the `http.Request` and `http.Response` classes to store headers in maps instead of object
992
1028
  literals.
993
1029
  * Updated `ws` dependency to version `1.0.1`.
@@ -1000,7 +1036,8 @@ the selenium-webdriver package README.
1000
1036
 
1001
1037
  ### Changes for W3C WebDriver Spec Compliance
1002
1038
 
1003
- * 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`.
1004
1041
 
1005
1042
  ## v2.49-51
1006
1043
 
@@ -1024,7 +1061,8 @@ the selenium-webdriver package README.
1024
1061
  version
1025
1062
  `2.1.1`.
1026
1063
  * FIXED: the `webdriver.promise.ControlFlow` now has a consistent execution order for
1027
- 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.
1028
1066
  * FIXED: do not drop user auth from the WebDriver server URL.
1029
1067
  * FIXED: a single `firefox.Binary` instance may be used to configure and launch multiple
1030
1068
  FirefoxDriver sessions.
@@ -1054,7 +1092,7 @@ continue to be supported, but will require setting the `--harmony` flag.
1054
1092
  ### Change Summary
1055
1093
 
1056
1094
  * Add support for [Node v4.0.0](https://nodejs.org/en/blog/release/v4.0.0/)
1057
- * Updated `ws` dependency from `0.7.1` to `0.8.0`
1095
+ * Updated `ws` dependency from `0.7.1` to `0.8.0`
1058
1096
  * Bumped the minimum supported version of Node from `0.10.x` to `0.12.x`. This is in accordance with
1059
1097
  the Node support policy established in `v2.45.0`.
1060
1098
 
@@ -1071,14 +1109,14 @@ continue to be supported, but will require setting the `--harmony` flag.
1071
1109
  * Added support for using a proxy server for WebDriver commands. See `Builder#usingWebDriverProxy()`
1072
1110
  for more info.
1073
1111
  * Removed deprecated functions:
1074
- * Capabilities#toJSON()
1075
- * UnhandledAlertError#getAlert()
1076
- * chrome.createDriver()
1077
- * phantomjs.createDriver()
1078
- * promise.ControlFlow#annotateError()
1079
- * promise.ControlFlow#await()
1080
- * promise.ControlFlow#clearHistory()
1081
- * 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()
1082
1120
  * Removed deprecated enum values: `ErrorCode.NO_MODAL_DIALOG_OPEN` and
1083
1121
  `ErrorCode.MODAL_DIALOG_OPENED`. Use `ErrorCode.NO_SUCH_ALERT` and
1084
1122
  `ErrorCode.UNEXPECTED_ALERT_OPEN`, respectively.
@@ -1102,7 +1140,8 @@ continue to be supported, but will require setting the `--harmony` flag.
1102
1140
  * FIXED: 8548: Task callbacks are once again dropped if the task was cancelled due to a previously
1103
1141
  uncaught error within the frame.
1104
1142
  * FIXED: 8496: Extended the `chrome.Options` API to cover all configuration options (e.g. mobile
1105
- 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).
1106
1145
 
1107
1146
  ## v2.45.0
1108
1147
 
@@ -1177,7 +1216,8 @@ major version release (i.e. 1.0.0).
1177
1216
  * Expanded the interactions API to include touch actions. See `WebDriver.touchActions()`.
1178
1217
  * FIXED: 8380: `firefox.Driver` will delete its temporary profile on `quit`.
1179
1218
  * FIXED: 8306: Stack overflow in promise callbacks eliminated.
1180
- * 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).
1181
1221
  * FIXED: 8128: When the FirefoxDriver marshals an object to the page for
1182
1222
  `executeScript`, it defines additional properties (required by the driver's implementation). These
1183
1223
  properties will no longer be enumerable and should be omitted (i.e. they won't show up in
@@ -1380,14 +1420,14 @@ major version release (i.e. 1.0.0).
1380
1420
  * For Promises/A+ compatibility, backing out the change in 2.30.0 that ensured rejections were
1381
1421
  always Error objects. Rejection reasons are now left as is.
1382
1422
  * Removed deprecated functions originally scheduled for removal in 2.31.0
1383
- * promise.Application.getInstance()
1384
- * promise.ControlFlow#schedule()
1385
- * promise.ControlFlow#scheduleTimeout()
1386
- * promise.ControlFlow#scheduleWait()
1423
+ * promise.Application.getInstance()
1424
+ * promise.ControlFlow#schedule()
1425
+ * promise.ControlFlow#scheduleTimeout()
1426
+ * promise.ControlFlow#scheduleWait()
1387
1427
  * Renamed some functions for consistency with Promises/A+ terminology. The original functions have
1388
1428
  been deprecated and will be removed in 2.34.0:
1389
- * promise.resolved() -> promise.fulfilled()
1390
- * promise.Deferred#resolve() -> promise.Deferred#fulfill()
1429
+ * promise.resolved() -> promise.fulfilled()
1430
+ * promise.Deferred#resolve() -> promise.Deferred#fulfill()
1391
1431
  * FIXED: remote.SeleniumServer#stop now shuts down within the active control flow, allowing scripts
1392
1432
  to finish. Use #kill to shutdown immediately.
1393
1433
  * FIXED: 5321: cookie deletion commands