selenium-webdriver 4.17.0 → 4.18.1
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 +240 -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,20 @@
|
|
|
1
|
+
## 4.18.1
|
|
2
|
+
|
|
3
|
+
* Add CDP for Chrome 122 and remove 119
|
|
4
|
+
|
|
5
|
+
## 4.18.0
|
|
6
|
+
|
|
7
|
+
* Fix running the casting related methods in chromium (#13479)
|
|
8
|
+
* [bidi] Add browsing context destroyed event
|
|
9
|
+
* [bidi] Add realm destroyed event
|
|
10
|
+
* [bidi] Add locate node command (#13489)
|
|
11
|
+
* [bidi] Deprecate NetworkInspector in favor of Network
|
|
12
|
+
* Make `npm run lint` pass for javascript/node/selenium-webdriver (#13560)
|
|
13
|
+
* [bidi] Add "addintercept" and "removeintercept" commands (#13564)
|
|
14
|
+
* [bidi] Add auth related commands (#13572)
|
|
15
|
+
* [bidi] Add 'continueWithAuth' command
|
|
16
|
+
* [bidi] Add 'fetchError' command
|
|
17
|
+
|
|
1
18
|
## 4.17.0
|
|
2
19
|
|
|
3
20
|
* Add javascript to Selenium Manager input for tracking (see #13288)
|
|
@@ -26,7 +43,6 @@
|
|
|
26
43
|
|
|
27
44
|
* Add CDP v120 and remove v117
|
|
28
45
|
|
|
29
|
-
|
|
30
46
|
## 4.15.0
|
|
31
47
|
|
|
32
48
|
#### :bug: Bug fix
|
|
@@ -54,7 +70,7 @@
|
|
|
54
70
|
#### :nail_care: Polish
|
|
55
71
|
|
|
56
72
|
* Adding CDP v117 and removing v114
|
|
57
|
-
* Added file location to exception message for Selenium Manager
|
|
73
|
+
* Added file location to exception message for Selenium Manager
|
|
58
74
|
|
|
59
75
|
#### :rocket: New Feature
|
|
60
76
|
|
|
@@ -248,15 +264,15 @@ fix: iedriver download with selenium-manager #11579
|
|
|
248
264
|
#### :rocket: New Feature
|
|
249
265
|
|
|
250
266
|
* Adds 'Select' support package
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
267
|
+
* selectByIndex
|
|
268
|
+
* selectByValue
|
|
269
|
+
* selectByVisibleText
|
|
270
|
+
* getAllSelectedOptions
|
|
271
|
+
* getFirstSelectedOption
|
|
272
|
+
* deselectAll
|
|
273
|
+
* deselectByVisibleText
|
|
274
|
+
* deselectByIndex
|
|
275
|
+
* deselectByValue
|
|
260
276
|
* Add support for Actions API sendKeys to designated element
|
|
261
277
|
* Adds mouse button enum for forward and backward navigation
|
|
262
278
|
|
|
@@ -264,7 +280,8 @@ fix: iedriver download with selenium-manager #11579
|
|
|
264
280
|
|
|
265
281
|
* Set min node support to 14.x.x (issue 1 in #10970)
|
|
266
282
|
* fix: geckodriver session with node 18.x.x (issue 2 in #10970)
|
|
267
|
-
* fix: JS firefox driver crashes on setting a profile (fixed
|
|
283
|
+
* fix: JS firefox driver crashes on setting a profile (fixed
|
|
284
|
+
with [commit](https://github.com/SeleniumHQ/selenium/commit/fa6deeea6bda1e73317157845772e114bd569b7d))
|
|
268
285
|
* fix: "SetExperimental" option is not available in webdriverjs (Javascript/Typescript) (#10959)
|
|
269
286
|
* fix: Do not allow Select class to select disabled options (#10812)
|
|
270
287
|
|
|
@@ -334,7 +351,8 @@ fix: iedriver download with selenium-manager #11579
|
|
|
334
351
|
* ignore errors arising from trying to use file detector fixes #6343
|
|
335
352
|
* Added RelativeBy class on the main api (#10148)
|
|
336
353
|
* Code cleanup and minor improvements
|
|
337
|
-
* Implements 'getDomAttribute' to get attribute value as defined by w3c spec and removes legacy
|
|
354
|
+
* Implements 'getDomAttribute' to get attribute value as defined by w3c spec and removes legacy
|
|
355
|
+
command usages
|
|
338
356
|
* Remove legacy JWP support and w3c<boolean> switch (#10095)
|
|
339
357
|
* update map/filter clean up to common format (#10094)
|
|
340
358
|
|
|
@@ -417,7 +435,7 @@ fix: iedriver download with selenium-manager #11579
|
|
|
417
435
|
## v4.0.0-beta.1
|
|
418
436
|
|
|
419
437
|
* JS Binding support for WebDriver Bidi in Firefox
|
|
420
|
-
|
|
438
|
+
* This requires Firefox 87 and Geckodriver 0.29 to be able to work
|
|
421
439
|
* Update the supported CDP versions
|
|
422
440
|
* Update tmp package version (#9155)
|
|
423
441
|
* Adding support for /computedlabel (getAccessibleName) (#9073)
|
|
@@ -431,11 +449,12 @@ fix: iedriver download with selenium-manager #11579
|
|
|
431
449
|
|
|
432
450
|
* Rolling back native support for Opera Browser
|
|
433
451
|
* Added new ieOptions capabilities:
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
452
|
+
* fileUploadDialogTimeout
|
|
453
|
+
* setEdgePath
|
|
454
|
+
* setEdgeChromium
|
|
455
|
+
* setScrollBehavior
|
|
456
|
+
* For consistent naming, deprecating `addArguments(...args)` in favor
|
|
457
|
+
of `addBrowserCommandSwitches(...args)`
|
|
439
458
|
|
|
440
459
|
* Added relative locators
|
|
441
460
|
* Added Chrome DevTools Protocol (CDP) support
|
|
@@ -491,28 +510,32 @@ mode (see `example/headless.js`)
|
|
|
491
510
|
### Changes for W3C WebDriver Spec Compliance
|
|
492
511
|
|
|
493
512
|
* 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
|
|
513
|
+
<https://www.w3.org/TR/webdriver/#actions>. For details, refer to the JS doc on
|
|
514
|
+
the `lib/input.Actions` class.
|
|
495
515
|
|
|
496
516
|
As of January, 2018, only Firefox natively supports this new API. You can put the `Actions` class
|
|
497
517
|
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
|
|
518
|
+
see class docs). Alternatively, you may continue to use the legacy API directly via
|
|
519
|
+
the `lib/actions` module.
|
|
499
520
|
__NOTE:__ The legacy API is considered strongly deprecated and will be removed in a minor release
|
|
500
521
|
once Google's Chrome and Microsoft's Edge browsers support the new API.
|
|
501
522
|
|
|
502
523
|
* All window manipulation commands are now supported.
|
|
503
524
|
* Added `driver.switchTo().parentFrame()`
|
|
504
|
-
* When a named cookie is requested, attempt to fetch it directly using the W3C
|
|
525
|
+
* When a named cookie is requested, attempt to fetch it directly using the W3C
|
|
526
|
+
endpoint, `GET /session/{session id}/cookie/{name}`. If this command is not recognized by the
|
|
505
527
|
remote end, fallback to fetching all cookies and then searching for the desired name.
|
|
506
|
-
* Replaced `WebElement.getSize()` and `WebElement.getLocation()` with a single
|
|
528
|
+
* Replaced `WebElement.getSize()` and `WebElement.getLocation()` with a single
|
|
529
|
+
method, `WebElement.getRect()`.
|
|
507
530
|
|
|
508
531
|
### API Changes
|
|
509
532
|
|
|
510
533
|
* The core WebDriver API no longer uses promise manager
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
534
|
+
* Removed `index.Builder#setControlFlow()`
|
|
535
|
+
* The following thenable types no longer have a `cancel()` method:
|
|
536
|
+
* The dynamically generated thenable WebDrivers created by `index.Builder`
|
|
537
|
+
* `lib/webdriver.AlertPromise`
|
|
538
|
+
* `lib/webdriver.WebElementPromise`
|
|
516
539
|
* Removed `remote/index.DriverService.prototype.stop()` (use `#kill()` instead)
|
|
517
540
|
* Removed the `lib/actions` module
|
|
518
541
|
* Removed the `lib/events` module
|
|
@@ -520,124 +543,127 @@ mode (see `example/headless.js`)
|
|
|
520
543
|
* Removed the 'opera' module
|
|
521
544
|
* Removed the promise manager from `lib/promise`, which includes the removal of the following
|
|
522
545
|
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
|
-
|
|
546
|
+
* CancellableThenable
|
|
547
|
+
* CancellationError
|
|
548
|
+
* ControlFlow
|
|
549
|
+
* Deferred
|
|
550
|
+
* LONG_STACK_TRACES
|
|
551
|
+
* MultipleUnhandledRejectionError
|
|
552
|
+
* Promise (use native Promises)
|
|
553
|
+
* Resolver
|
|
554
|
+
* Scheduler
|
|
555
|
+
* Thenable
|
|
556
|
+
* USE_PROMISE_MANAGER
|
|
557
|
+
* all (use Promise.all)
|
|
558
|
+
* asap (use Promise.resolve)
|
|
559
|
+
* captureStackTrace (use Error.captureStackTrace)
|
|
560
|
+
* consume (use async functions)
|
|
561
|
+
* controlFlow
|
|
562
|
+
* createPromise (use new Promise)
|
|
563
|
+
* defer
|
|
564
|
+
* fulfilled (use Promise.resolve)
|
|
565
|
+
* isGenerator
|
|
566
|
+
* rejected (use Promise.reject)
|
|
567
|
+
* setDefaultFlow
|
|
568
|
+
* when (use Promise.resolve)
|
|
546
569
|
* Changes to the `Builder` class:
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
570
|
+
* Added setChromeService, setEdgeService, & setFirefoxService
|
|
571
|
+
* Removed setEnableNativeEvents
|
|
572
|
+
* Removed setScrollBehavior
|
|
550
573
|
* Changes to `chrome.Driver`
|
|
551
|
-
|
|
552
|
-
|
|
574
|
+
* Added sendDevToolsCommand
|
|
575
|
+
* Added setDownloadPath
|
|
553
576
|
* Changes to `chrome.Options`
|
|
554
|
-
|
|
555
|
-
|
|
577
|
+
* Now extends the `Capabilities` class
|
|
578
|
+
* Removed from/toCapabilities
|
|
556
579
|
* Changes to `edge.Options`
|
|
557
|
-
|
|
558
|
-
|
|
580
|
+
* Now extends the `Capabilities` class
|
|
581
|
+
* Removed from/toCapabilities
|
|
559
582
|
* Changes to `ie.Options`
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
* Removed the `firefox.Binary` class. Custom binaries can still be selected
|
|
583
|
+
* Now extends the `Capabilities` class
|
|
584
|
+
* Removed from/toCapabilities
|
|
585
|
+
* Removed the `firefox.Binary` class. Custom binaries can still be selected
|
|
586
|
+
using `firefox.Options#setBinary()`. Likewise, custom binary arguments can be specified
|
|
563
587
|
with `firefox.Options#addArguments()`.
|
|
564
588
|
* Changes to `firefox.Driver`
|
|
565
|
-
|
|
566
|
-
|
|
589
|
+
* Added installAddon(path)
|
|
590
|
+
* Added uninstallAddon(id)
|
|
567
591
|
* Changes to `firefox.Options`
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
* Removed the `firefox.Profile` class. All of its functionality is now provided directly
|
|
592
|
+
* Now extends the `Capabilities` class
|
|
593
|
+
* Removed from/toCapabilities
|
|
594
|
+
* Removed setLoggingPreferences (was a no-op)
|
|
595
|
+
* setProfile now only accepts a path to an existing profile
|
|
596
|
+
* Added addExtensions
|
|
597
|
+
* Added setPreference
|
|
598
|
+
* Removed the `firefox.Profile` class. All of its functionality is now provided directly
|
|
599
|
+
by `firefox.Options`
|
|
575
600
|
* Removed the `firefox/binary` module
|
|
576
601
|
* Removed the `firefox/profile` module
|
|
577
602
|
* Changes to `safari.Options`
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
603
|
+
* Now extends the `Capabilities` class
|
|
604
|
+
* Removed from/toCapabilities
|
|
605
|
+
* Removed setCleanSession (was a no-op)
|
|
581
606
|
* Changes to `lib/capabilities.Browser`:
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
607
|
+
* Removed several enum values.
|
|
608
|
+
* ANDROID (use Chrome for Android; see docs on the chrome module)
|
|
609
|
+
* IPAD (no support available)
|
|
610
|
+
* IPHONE (no support available)
|
|
611
|
+
* OPERA (use Chrome)
|
|
612
|
+
* PHANTOM_JS (use Chrome or Firefox in headless mode)
|
|
613
|
+
* HTMLUNIT (use Chrome or Firefox in headless mode)
|
|
589
614
|
* Changes to `lib/capabilities.Capabilities`:
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
615
|
+
* Removed static factory methods android(), ipad(), iphone(), opera(), phantomjs(), htmlunit(),
|
|
616
|
+
and htmlunitwithjs(). Users can still manually configure capabilities for these, but their use
|
|
617
|
+
is not recommended and they will no longer be surfaced in the API.
|
|
593
618
|
* Changes to `lib/error`:
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
619
|
+
* Added
|
|
620
|
+
* ElementClickInterceptedError
|
|
621
|
+
* InsecureCertificateError
|
|
622
|
+
* InvalidCoordinatesError
|
|
623
|
+
* NoSuchCookieError
|
|
624
|
+
* Removed
|
|
625
|
+
* ElementNotVisibleError
|
|
626
|
+
* InvalidElementCoordinatesError
|
|
602
627
|
* Changes to `lib/webdriver.WebDriver`:
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
628
|
+
* Dropped support for "requiredCapabilities" from WebDriver.createSession
|
|
629
|
+
* actions() now returns the new `lib/input.Actions` class
|
|
630
|
+
* Removed touchActions
|
|
631
|
+
* Renamed schedule to execute
|
|
632
|
+
* Removed the `WebDriver.attachToSession()` factory method. Users can just the `WebDriver`
|
|
633
|
+
constructor directly instead.
|
|
634
|
+
* Removed the `call()` method. This was used to inject custom function calls into the control
|
|
635
|
+
flow. Now that the promise manager is no longer used, this method is no longer necessary.
|
|
636
|
+
Users are now responsible for coordinating actions (ideally with async functions) and can just
|
|
637
|
+
call functions directly instead of through `driver.call()`.
|
|
612
638
|
* Changes to `lib/webdriver.WebElement`:
|
|
613
|
-
|
|
639
|
+
* Replaced getSize & getLocation with getRect
|
|
614
640
|
* Changes to `lib/webdriver.Alert`:
|
|
615
|
-
|
|
641
|
+
* Removed authenticateAs
|
|
616
642
|
* Changes to `lib/webdriver.Options` (`driver.manage()`):
|
|
617
|
-
|
|
643
|
+
* Removed timeouts (use get/setTimeouts)
|
|
618
644
|
* Changes to `lib/webdriver.Window` (`driver.manage().window()`):
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
645
|
+
* Added
|
|
646
|
+
* getRect
|
|
647
|
+
* setRect
|
|
648
|
+
* fullscreen
|
|
649
|
+
* minimize
|
|
650
|
+
* Removed (use the getRect/setRect methods)
|
|
651
|
+
* getPosition
|
|
652
|
+
* setPosition
|
|
653
|
+
* getSize
|
|
654
|
+
* setSize
|
|
629
655
|
* Removed the `testing/assert` module
|
|
630
656
|
* Changes to `testing/index`
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
657
|
+
* Since the promise manager has been removed, it is no longer necessary to wrap the Mocha test
|
|
658
|
+
hooks; instead, users can simply use async functions. The following have all been removed:
|
|
659
|
+
* describe
|
|
660
|
+
* before
|
|
661
|
+
* beforeEach
|
|
662
|
+
* after
|
|
663
|
+
* afterEach
|
|
664
|
+
* it
|
|
665
|
+
* Added the `suite` function. For details, refer to the jsdoc or
|
|
666
|
+
`example/google_search_test.js`
|
|
641
667
|
|
|
642
668
|
## v3.6.0
|
|
643
669
|
|
|
@@ -653,18 +679,18 @@ mode (see `example/headless.js`)
|
|
|
653
679
|
### API Changes
|
|
654
680
|
|
|
655
681
|
* Added new methods to `selenium-webdriver/firefox.Options`:
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
682
|
+
* addArguments()
|
|
683
|
+
* headless()
|
|
684
|
+
* windowSize()
|
|
659
685
|
* Deprecated `selenium-webdriver/firefox/binary.Binary`
|
|
660
686
|
* Removed `selenium-webdriver/firefox.Options#useGeckoDriver()`
|
|
661
687
|
* Removed the unused `selenium-webdriver/firefox/profile.decode()`
|
|
662
688
|
* Removed methods from `selenium-webdriver/firefox/profile.Profile` that had no effect since support
|
|
663
689
|
for the legacy FirefoxDriver was dropped in 3.5.0:
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
690
|
+
* setNativeEventsEnabled
|
|
691
|
+
* nativeEventsEnabled
|
|
692
|
+
* getPort
|
|
693
|
+
* setPort
|
|
668
694
|
* Removed `selenium-webdriver/firefox.ServiceBuilder#setFirefoxBinary()`; custom binaries should be
|
|
669
695
|
configured through the `firefox.Options` class.
|
|
670
696
|
* Removed `selenium-webdriver/firefox.Capability`. These hold overs from the legacy FirefoxDriver
|
|
@@ -686,11 +712,12 @@ to a remote Selenium server that supports Firefox 45.
|
|
|
686
712
|
### Changes
|
|
687
713
|
|
|
688
714
|
* Removed native support for Firefox 46 and older.
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
715
|
+
* The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect.
|
|
716
|
+
* `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated.
|
|
717
|
+
* `selenium-webdriver/firefox.Options#useGeckoDriver()` is deprecated and now a no-op.
|
|
692
718
|
* `firefox.Options` will no longer discard the `"moz:firefoxOptions"` set in user provided
|
|
693
|
-
capabilities (via `Builder.withCapabilities({})`). When both are used, the settings
|
|
719
|
+
capabilities (via `Builder.withCapabilities({})`). When both are used, the settings
|
|
720
|
+
in `firefox.Options` will be applied _last_.
|
|
694
721
|
* Added `chrome.Options#headless()` and `chrome.Options#windowSize()`, which may be used to start
|
|
695
722
|
Chrome in headless mode (requires Chrome 59+) and to set the initial window size, respectively.
|
|
696
723
|
|
|
@@ -704,7 +731,8 @@ to a remote Selenium server that supports Firefox 45.
|
|
|
704
731
|
|
|
705
732
|
### Notice
|
|
706
733
|
|
|
707
|
-
This release
|
|
734
|
+
This release
|
|
735
|
+
requires [geckodriver 0.15.0](https://github.com/mozilla/geckodriver/releases/tag/v0.15.0) or newer.
|
|
708
736
|
|
|
709
737
|
### API Changes
|
|
710
738
|
|
|
@@ -743,7 +771,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
|
|
|
743
771
|
## v3.1.0
|
|
744
772
|
|
|
745
773
|
* The `lib` package is once again platform agnostic (excluding `lib/devmode`).
|
|
746
|
-
* Deprecated `promise.when(value, callback, errback)`.
|
|
774
|
+
* Deprecated `promise.when(value, callback, errback)`.
|
|
775
|
+
Use `promise.fulfilled(value).then(callback, errback)`
|
|
747
776
|
* Changed `promise.fulfilled(value)`, `promise.rejected(reason)` and
|
|
748
777
|
`promise.defer()` to all use native promises when the promise manager is disabled.
|
|
749
778
|
* Properly handle W3C error responses to new session commands.
|
|
@@ -760,9 +789,10 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
|
|
|
760
789
|
## v3.0.1
|
|
761
790
|
|
|
762
791
|
* 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
|
|
792
|
+
* Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)`
|
|
793
|
+
* Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)`
|
|
794
|
+
* When a `wait()` condition times out, the returned promise will now be rejected with
|
|
795
|
+
an `error.TimeoutError` instead of a generic `Error` object.
|
|
766
796
|
* `WebDriver#wait()` will now throw a TypeError if an invalid wait condition is provided.
|
|
767
797
|
* Properly catch unhandled promise rejections with an action sequence (only impacts when the promise
|
|
768
798
|
manager is disabled).
|
|
@@ -789,17 +819,19 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
|
|
|
789
819
|
`SELENIUM_PROMISE_MANAGER=0`. This is part of a larger plan to remove the promise manager, as
|
|
790
820
|
documented at
|
|
791
821
|
<https://github.com/SeleniumHQ/selenium/issues/2969>
|
|
792
|
-
* When communicating with a W3C-compliant remote end, use the atoms library for
|
|
822
|
+
* When communicating with a W3C-compliant remote end, use the atoms library for
|
|
823
|
+
the `WebElement.getAttribute()` and `WebElement.isDisplayed()` commands. This behavior is
|
|
793
824
|
consistent with the java, .net, python, and ruby clients.
|
|
794
825
|
|
|
795
826
|
### API Changes
|
|
796
827
|
|
|
797
828
|
* Removed `safari.Options#useLegacyDriver()`
|
|
798
829
|
* 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
|
|
830
|
+
* Removed `#isPending()`
|
|
831
|
+
* Removed `#cancel()`
|
|
832
|
+
* Removed `#finally()`
|
|
833
|
+
* Changed all subclasses of `webdriver.WebDriver` to overload the static
|
|
834
|
+
function `WebDriver.createSession()` instead of doing work in the constructor. All constructors
|
|
803
835
|
now inherit the base class' function signature. Users are still encouraged to use the `Builder`
|
|
804
836
|
class instead of creating drivers directly.
|
|
805
837
|
* `Builder#build()` now returns a "thenable" WebDriver instance, allowing users to immediately
|
|
@@ -812,8 +844,10 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
|
|
|
812
844
|
|
|
813
845
|
* Fixed a bug where the promise manager would silently drop callbacks after recovering from an
|
|
814
846
|
unhandled promise rejection.
|
|
815
|
-
* Added the `firefox.ServiceBuilder` class, which may be used to customize the geckodriver used
|
|
816
|
-
|
|
847
|
+
* Added the `firefox.ServiceBuilder` class, which may be used to customize the geckodriver used
|
|
848
|
+
for `firefox.Driver` instances.
|
|
849
|
+
* Added support for Safari 10 safaridriver. safaridriver may be disabled via tha
|
|
850
|
+
API, `safari.Options#useLegacyDriver`, to use the safari extension driver.
|
|
817
851
|
* Updated the `lib/proxy` module to support configuring a SOCKS proxy.
|
|
818
852
|
* For the `promise.ControlFlow`, fire the "uncaughtException" event in a new turn of the JS event
|
|
819
853
|
loop. As a result of this change, any errors thrown by an event listener will propagate to the
|
|
@@ -837,7 +871,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
|
|
|
837
871
|
|
|
838
872
|
### Changes for W3C WebDriver Spec Compliance
|
|
839
873
|
|
|
840
|
-
* Updated command mappings
|
|
874
|
+
* Updated command mappings
|
|
875
|
+
for [getting](https://w3c.github.io/webdriver/webdriver-spec.html#get-window-position)
|
|
841
876
|
and [setting](https://w3c.github.io/webdriver/webdriver-spec.html#set-window-position)
|
|
842
877
|
the window position.
|
|
843
878
|
|
|
@@ -864,7 +899,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
|
|
|
864
899
|
* Properly configure proxies when using the geckodriver
|
|
865
900
|
* `http.Executor` now accepts a promised client. The `builder.Builder` class will now use this
|
|
866
901
|
instead of a `command.DeferredExecutor` when creating WebDriver instances.
|
|
867
|
-
* For Chrome and Firefox, the `builder.Builder` class will always return an
|
|
902
|
+
* For Chrome and Firefox, the `builder.Builder` class will always return an
|
|
903
|
+
instanceof `chrome.Driver` and `firefox.Driver`, respectively, even when configured to use a
|
|
868
904
|
remote server (from `builder.Builder#usingServer(url)`,
|
|
869
905
|
`SELENIUM_REMOTE_URL`, etc).
|
|
870
906
|
|
|
@@ -877,32 +913,32 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
|
|
|
877
913
|
_seconds_ since epoch. When retrieving cookies, the expiration is always returned in seconds.
|
|
878
914
|
* Renamed `firefox.Options#useMarionette` to `firefox.Options#useGeckoDriver`
|
|
879
915
|
* Removed deprecated modules:
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
916
|
+
* `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\
|
|
917
|
+
or the `error` property exported by `selenium-webdriver`)
|
|
918
|
+
* `selenium-webdriver/executors` — this was not previously deprecated, but is no longer used.
|
|
883
919
|
* Removed deprecated types:
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
920
|
+
* `command.DeferredExecutor` — this was not previously deprecated, but is no longer used. It can
|
|
921
|
+
be trivially implemented by clients should it be needed.
|
|
922
|
+
* `error.InvalidSessionIdError` (use `error.NoSuchSessionError`)
|
|
923
|
+
* `executors.DeferredExecutor`
|
|
924
|
+
* `until.Condition` (use `webdriver.Condition`)
|
|
925
|
+
* `until.WebElementCondition` (use `webdriver.WebElementCondition`)
|
|
926
|
+
* `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`)
|
|
891
927
|
* Removed deprecated functions:
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
928
|
+
* `Deferred#cancel()`
|
|
929
|
+
* `Deferred#catch()`
|
|
930
|
+
* `Deferred#finally()`
|
|
931
|
+
* `Deferred#isPending()`
|
|
932
|
+
* `Deferred#then()`
|
|
933
|
+
* `Promise#thenCatch()`
|
|
934
|
+
* `Promise#thenFinally()`
|
|
935
|
+
* `WebDriver#isElementPresent()`
|
|
936
|
+
* `WebElement#getInnerHtml()`
|
|
937
|
+
* `WebElement#getOuterHtml()`
|
|
938
|
+
* `WebElement#getRawId()`
|
|
939
|
+
* `WebElement#isElementPresent()`
|
|
904
940
|
* Removed deprecated properties:
|
|
905
|
-
|
|
941
|
+
* `WebDriverError#code`
|
|
906
942
|
|
|
907
943
|
## v2.53.2
|
|
908
944
|
|
|
@@ -926,7 +962,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
|
|
|
926
962
|
Marionette may be enabled via the API,
|
|
927
963
|
`firefox.Options#useMarionette`, or by setting the `SELENIUM_MARIONETTE`
|
|
928
964
|
environment variable.
|
|
929
|
-
* Moved all logic for parsing and interpreting responses from the remote end into the
|
|
965
|
+
* Moved all logic for parsing and interpreting responses from the remote end into the
|
|
966
|
+
individual `command.Executor` implementations.
|
|
930
967
|
* For consistency with the other Selenium language bindings,
|
|
931
968
|
`WebDriver#isElementPresent()` and `WebElement#isElementPresent()` have been deprecated. These
|
|
932
969
|
methods will be removed in v3.0. Use the findElements command to test for the presence of an
|
|
@@ -948,7 +985,8 @@ This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodrive
|
|
|
948
985
|
* FIXED: `io.findInPath()` will no longer match against directories that have the same basename as
|
|
949
986
|
the target file.
|
|
950
987
|
* 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
|
|
988
|
+
for the phantomjs executable's output. This may be quickly set at runtime with
|
|
989
|
+
the `SELENIUM_PHANTOMJS_LOG` environment variable.
|
|
952
990
|
|
|
953
991
|
### Changes for W3C WebDriver Spec Compliance
|
|
954
992
|
|
|
@@ -986,8 +1024,10 @@ the selenium-webdriver package README.
|
|
|
986
1024
|
(Map semantics). To check whether the value is true, use `get(key)`.
|
|
987
1025
|
* Deprecated `executors.DeferredExecutor` in favor of
|
|
988
1026
|
`lib/command.DeferredExecutor`.
|
|
989
|
-
* API documentation is no longer distributed with the npm package, but remains available
|
|
990
|
-
|
|
1027
|
+
* API documentation is no longer distributed with the npm package, but remains available
|
|
1028
|
+
at <http://seleniumhq.github.io/selenium/docs/api/javascript/>
|
|
1029
|
+
* Rewrote the `error` module to export an Error subtype for each type of error defined in
|
|
1030
|
+
the [W3C WebDriver spec](https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors).
|
|
991
1031
|
* Changed the `http.Request` and `http.Response` classes to store headers in maps instead of object
|
|
992
1032
|
literals.
|
|
993
1033
|
* Updated `ws` dependency to version `1.0.1`.
|
|
@@ -1000,7 +1040,8 @@ the selenium-webdriver package README.
|
|
|
1000
1040
|
|
|
1001
1041
|
### Changes for W3C WebDriver Spec Compliance
|
|
1002
1042
|
|
|
1003
|
-
* Updated the `By` locators that are not in the W3C spec to delegated to using CSS
|
|
1043
|
+
* Updated the `By` locators that are not in the W3C spec to delegated to using CSS
|
|
1044
|
+
selectors: `By.className`, `By.id`, `By.name`, and `By.tagName`.
|
|
1004
1045
|
|
|
1005
1046
|
## v2.49-51
|
|
1006
1047
|
|
|
@@ -1024,7 +1065,8 @@ the selenium-webdriver package README.
|
|
|
1024
1065
|
version
|
|
1025
1066
|
`2.1.1`.
|
|
1026
1067
|
* 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
|
|
1068
|
+
tasks/callbacks scheduled in different turns of the JS event loop. Refer to
|
|
1069
|
+
the `webdriver.promise` documentation for more details.
|
|
1028
1070
|
* FIXED: do not drop user auth from the WebDriver server URL.
|
|
1029
1071
|
* FIXED: a single `firefox.Binary` instance may be used to configure and launch multiple
|
|
1030
1072
|
FirefoxDriver sessions.
|
|
@@ -1054,7 +1096,7 @@ continue to be supported, but will require setting the `--harmony` flag.
|
|
|
1054
1096
|
### Change Summary
|
|
1055
1097
|
|
|
1056
1098
|
* Add support for [Node v4.0.0](https://nodejs.org/en/blog/release/v4.0.0/)
|
|
1057
|
-
|
|
1099
|
+
* Updated `ws` dependency from `0.7.1` to `0.8.0`
|
|
1058
1100
|
* Bumped the minimum supported version of Node from `0.10.x` to `0.12.x`. This is in accordance with
|
|
1059
1101
|
the Node support policy established in `v2.45.0`.
|
|
1060
1102
|
|
|
@@ -1071,14 +1113,14 @@ continue to be supported, but will require setting the `--harmony` flag.
|
|
|
1071
1113
|
* Added support for using a proxy server for WebDriver commands. See `Builder#usingWebDriverProxy()`
|
|
1072
1114
|
for more info.
|
|
1073
1115
|
* Removed deprecated functions:
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1116
|
+
* Capabilities#toJSON()
|
|
1117
|
+
* UnhandledAlertError#getAlert()
|
|
1118
|
+
* chrome.createDriver()
|
|
1119
|
+
* phantomjs.createDriver()
|
|
1120
|
+
* promise.ControlFlow#annotateError()
|
|
1121
|
+
* promise.ControlFlow#await()
|
|
1122
|
+
* promise.ControlFlow#clearHistory()
|
|
1123
|
+
* promise.ControlFlow#getHistory()
|
|
1082
1124
|
* Removed deprecated enum values: `ErrorCode.NO_MODAL_DIALOG_OPEN` and
|
|
1083
1125
|
`ErrorCode.MODAL_DIALOG_OPENED`. Use `ErrorCode.NO_SUCH_ALERT` and
|
|
1084
1126
|
`ErrorCode.UNEXPECTED_ALERT_OPEN`, respectively.
|
|
@@ -1102,7 +1144,8 @@ continue to be supported, but will require setting the `--harmony` flag.
|
|
|
1102
1144
|
* FIXED: 8548: Task callbacks are once again dropped if the task was cancelled due to a previously
|
|
1103
1145
|
uncaught error within the frame.
|
|
1104
1146
|
* FIXED: 8496: Extended the `chrome.Options` API to cover all configuration options (e.g. mobile
|
|
1105
|
-
emulation and performance logging) documented on the
|
|
1147
|
+
emulation and performance logging) documented on the
|
|
1148
|
+
ChromeDriver [project site](https://chromedriver.chromium.org/capabilities).
|
|
1106
1149
|
|
|
1107
1150
|
## v2.45.0
|
|
1108
1151
|
|
|
@@ -1177,7 +1220,8 @@ major version release (i.e. 1.0.0).
|
|
|
1177
1220
|
* Expanded the interactions API to include touch actions. See `WebDriver.touchActions()`.
|
|
1178
1221
|
* FIXED: 8380: `firefox.Driver` will delete its temporary profile on `quit`.
|
|
1179
1222
|
* FIXED: 8306: Stack overflow in promise callbacks eliminated.
|
|
1180
|
-
* FIXED: 8221: Added support for defining custom command mappings. Includes support for
|
|
1223
|
+
* FIXED: 8221: Added support for defining custom command mappings. Includes support for
|
|
1224
|
+
PhantomJS's `executePhantomJS` (requires PhantomJS 1.9.7 or GhostDriver 1.1.0).
|
|
1181
1225
|
* FIXED: 8128: When the FirefoxDriver marshals an object to the page for
|
|
1182
1226
|
`executeScript`, it defines additional properties (required by the driver's implementation). These
|
|
1183
1227
|
properties will no longer be enumerable and should be omitted (i.e. they won't show up in
|
|
@@ -1380,14 +1424,14 @@ major version release (i.e. 1.0.0).
|
|
|
1380
1424
|
* For Promises/A+ compatibility, backing out the change in 2.30.0 that ensured rejections were
|
|
1381
1425
|
always Error objects. Rejection reasons are now left as is.
|
|
1382
1426
|
* Removed deprecated functions originally scheduled for removal in 2.31.0
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1427
|
+
* promise.Application.getInstance()
|
|
1428
|
+
* promise.ControlFlow#schedule()
|
|
1429
|
+
* promise.ControlFlow#scheduleTimeout()
|
|
1430
|
+
* promise.ControlFlow#scheduleWait()
|
|
1387
1431
|
* Renamed some functions for consistency with Promises/A+ terminology. The original functions have
|
|
1388
1432
|
been deprecated and will be removed in 2.34.0:
|
|
1389
|
-
|
|
1390
|
-
|
|
1433
|
+
* promise.resolved() -> promise.fulfilled()
|
|
1434
|
+
* promise.Deferred#resolve() -> promise.Deferred#fulfill()
|
|
1391
1435
|
* FIXED: remote.SeleniumServer#stop now shuts down within the active control flow, allowing scripts
|
|
1392
1436
|
to finish. Use #kill to shutdown immediately.
|
|
1393
1437
|
* FIXED: 5321: cookie deletion commands
|