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.
- package/CHANGES.md +236 -196
- package/bidi/addInterceptParameters.js +86 -0
- package/bidi/browsingContext.js +144 -37
- package/bidi/browsingContextInspector.js +13 -40
- package/bidi/evaluateResult.js +4 -10
- package/bidi/filterBy.js +2 -6
- package/bidi/index.js +31 -29
- package/bidi/input.js +1 -4
- package/bidi/interceptPhase.js +24 -0
- package/bidi/logInspector.js +15 -20
- package/bidi/network.js +178 -0
- package/bidi/networkInspector.js +8 -2
- package/bidi/networkTypes.js +22 -49
- package/bidi/protocolType.js +3 -9
- package/bidi/protocolValue.js +6 -25
- package/bidi/realmInfo.js +2 -10
- package/bidi/scriptManager.js +20 -59
- package/bidi/urlPattern.js +58 -0
- package/bin/linux/selenium-manager +0 -0
- package/bin/macos/selenium-manager +0 -0
- package/bin/windows/selenium-manager.exe +0 -0
- package/chrome.js +1 -8
- package/chromium.js +27 -109
- package/common/driverFinder.js +1 -1
- package/common/seleniumManager.js +9 -18
- package/devtools/CDPConnection.js +1 -3
- package/edge.js +1 -3
- package/example/chrome_android.js +2 -5
- package/example/chrome_mobile_emulation.js +2 -4
- package/example/google_search.js +1 -3
- package/example/headless.js +4 -10
- package/example/logging.js +3 -9
- package/firefox.js +55 -109
- package/http/index.js +7 -10
- package/ie.js +5 -15
- package/index.js +7 -29
- package/io/exec.js +1 -2
- package/io/index.js +3 -3
- package/io/zip.js +8 -30
- package/lib/by.js +2 -9
- package/lib/capabilities.js +3 -9
- package/lib/command.js +3 -3
- package/lib/error.js +2 -9
- package/lib/http.js +34 -131
- package/lib/input.js +10 -34
- package/lib/logging.js +3 -11
- package/lib/promise.js +2 -7
- package/lib/select.js +3 -9
- package/lib/until.js +28 -49
- package/lib/util.js +1 -4
- package/lib/virtual_authenticator.js +4 -22
- package/lib/webdriver.js +118 -297
- package/lib/webelement.js +1 -5
- package/net/index.js +1 -4
- package/package.json +2 -1
- package/remote/index.js +9 -24
- package/remote/util.js +6 -19
- package/safari.js +3 -8
- 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
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
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
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
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
|
-
|
|
548
|
-
|
|
549
|
-
|
|
566
|
+
* Added setChromeService, setEdgeService, & setFirefoxService
|
|
567
|
+
* Removed setEnableNativeEvents
|
|
568
|
+
* Removed setScrollBehavior
|
|
550
569
|
* Changes to `chrome.Driver`
|
|
551
|
-
|
|
552
|
-
|
|
570
|
+
* Added sendDevToolsCommand
|
|
571
|
+
* Added setDownloadPath
|
|
553
572
|
* Changes to `chrome.Options`
|
|
554
|
-
|
|
555
|
-
|
|
573
|
+
* Now extends the `Capabilities` class
|
|
574
|
+
* Removed from/toCapabilities
|
|
556
575
|
* Changes to `edge.Options`
|
|
557
|
-
|
|
558
|
-
|
|
576
|
+
* Now extends the `Capabilities` class
|
|
577
|
+
* Removed from/toCapabilities
|
|
559
578
|
* Changes to `ie.Options`
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
* Removed the `firefox.Binary` class. Custom binaries can still be selected
|
|
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
|
-
|
|
566
|
-
|
|
585
|
+
* Added installAddon(path)
|
|
586
|
+
* Added uninstallAddon(id)
|
|
567
587
|
* Changes to `firefox.Options`
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
* Removed the `firefox.Profile` class. All of its functionality is now provided directly
|
|
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
|
-
|
|
579
|
-
|
|
580
|
-
|
|
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
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
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
|
-
|
|
591
|
-
|
|
592
|
-
|
|
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
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
615
|
+
* Added
|
|
616
|
+
* ElementClickInterceptedError
|
|
617
|
+
* InsecureCertificateError
|
|
618
|
+
* InvalidCoordinatesError
|
|
619
|
+
* NoSuchCookieError
|
|
620
|
+
* Removed
|
|
621
|
+
* ElementNotVisibleError
|
|
622
|
+
* InvalidElementCoordinatesError
|
|
602
623
|
* Changes to `lib/webdriver.WebDriver`:
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
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
|
-
|
|
635
|
+
* Replaced getSize & getLocation with getRect
|
|
614
636
|
* Changes to `lib/webdriver.Alert`:
|
|
615
|
-
|
|
637
|
+
* Removed authenticateAs
|
|
616
638
|
* Changes to `lib/webdriver.Options` (`driver.manage()`):
|
|
617
|
-
|
|
639
|
+
* Removed timeouts (use get/setTimeouts)
|
|
618
640
|
* Changes to `lib/webdriver.Window` (`driver.manage().window()`):
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
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
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
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
|
-
|
|
657
|
-
|
|
658
|
-
|
|
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
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
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
|
-
|
|
690
|
-
|
|
691
|
-
|
|
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
|
|
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
|
|
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)`.
|
|
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
|
-
|
|
764
|
-
|
|
765
|
-
* When a `wait()` condition times out, the returned promise will now be rejected with
|
|
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
|
|
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
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
* Changed all subclasses of `webdriver.WebDriver` to overload the static
|
|
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
|
|
816
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
881
|
-
|
|
882
|
-
|
|
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
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
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
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
990
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
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
|
-
|
|
1390
|
-
|
|
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
|