UNPKG

44.5 kBMarkdownView Raw
1## v4.0.0-alpha.4
2
3### Changes
4
5* Removed BUILD.bazel files from the build artifact
6
7
8## v4.0.0-alpha.3
9
10### Notice
11
12* The minimum supported version of Node is now 10.15.0 LTS
13
14### Changes
15
16* add `pollTimeout` argument to the `wait()` method. Default value is `200`ms
17* add `switchTo().parentFrame()` for non-W3C compatible drivers
18* add support for opening a new window
19
20### API Changes
21
22* Export `lib/input.Origin` from the top level `selenium-webdriver` module.
23* HTTP requests from this library will now include a User-Agent of the form
24 `selenium/${VERSION} (js ${PLATFORM})`.
25
26
27## v4.0.0-alpha.1
28
29### Notice
30
31* The minimum supported version of Node is now 8.9.0 LTS
32
33### Changes to Supported Browsers
34
35Native support has been removed for Opera and PhantomJS as the WebDriver
36implementations for these browsers are no longer under active development.
37
38For Opera, users should be able to simply rely on testing Chrome as the Opera
39browser is based on Chromium (and the operadriver was a thin wrapper around
40chromedriver). For PhantomJS, users should use Chrome or Firefox in headless
41mode (see `example/headless.js`)
42
43### Changes for W3C WebDriver Spec Compliance
44
45* Revamped the actions API to conform with the WebDriver Spec:
46 <https://www.w3.org/TR/webdriver/#actions>. For details, refer to the JS doc
47 on the `lib/input.Actions` class.
48
49 As of January, 2018, only Firefox natively supports this new API. You can
50 put the `Actions` class into "bridge mode" and it will attempt to translate
51 mouse and keyboard actions to the legacy API (see class docs). Alternatively,
52 you may continue to use the legacy API directly via the `lib/actions` module.
53 __NOTE:__ The legacy API is considered strongly deprecated and will be
54 removed in a minor release once Google's Chrome and Microsoft's Edge browsers
55 support the new API.
56
57* All window manipulation commands are now supported.
58* Added `driver.switchTo().parentFrame()`
59* When a named cookie is requested, attempt to fetch it directly using the
60 W3C endpoint, `GET /session/{session id}/cookie/{name}`. If this command is
61 not recognized by the remote end, fallback to fetching all cookies and then
62 searching for the desired name.
63* Replaced `WebElement.getSize()` and `WebElement.getLocation()` with a single
64 method, `WebElement.getRect()`.
65
66### API Changes
67
68* The core WebDriver API no longer uses promise manager
69 - Removed `index.Builder#setControlFlow()`
70 - The following thenable types no longer have a `cancel()` method:
71 - The dynamically generated thenable WebDrivers created by `index.Builder`
72 - `lib/webdriver.AlertPromise`
73 - `lib/webdriver.WebElementPromise`
74* Removed `remote/index.DriverService.prototype.stop()` (use `#kill()` instead)
75* Removed the `lib/actions` module
76* Removed the `lib/events` module
77* Removed the `phantomjs` module
78* Removed the 'opera' module
79* Removed the promise manager from `lib/promise`, which includes the removal
80 of the following exported names (replacements, if any, in parentheses):
81 - CancellableThenable
82 - CancellationError
83 - ControlFlow
84 - Deferred
85 - LONG_STACK_TRACES
86 - MultipleUnhandledRejectionError
87 - Promise (use native Promises)
88 - Resolver
89 - Scheduler
90 - Thenable
91 - USE_PROMISE_MANAGER
92 - all (use Promise.all)
93 - asap (use Promise.resolve)
94 - captureStackTrace (use Error.captureStackTrace)
95 - consume (use async functions)
96 - controlFlow
97 - createPromise (use new Promise)
98 - defer
99 - fulfilled (use Promise.resolve)
100 - isGenerator
101 - rejected (use Promise.reject)
102 - setDefaultFlow
103 - when (use Promise.resolve)
104* Changes to the `Builder` class:
105 - Added setChromeService, setEdgeService, & setFirefoxService
106 - Removed setEnableNativeEvents
107 - Removed setScrollBehavior
108* Changes to `chrome.Driver`
109 - Added sendDevToolsCommand
110 - Added setDownloadPath
111* Changes to `chrome.Options`
112 - Now extends the `Capabilities` class
113 - Removed from/toCapabilities
114* Changes to `edge.Options`
115 - Now extends the `Capabilities` class
116 - Removed from/toCapabilities
117* Changes to `ie.Options`
118 - Now extends the `Capabilities` class
119 - Removed from/toCapabilities
120* Removed the `firefox.Binary` class. Custom binaries can still be selected
121 using `firefox.Options#setBinary()`. Likewise, custom binary arguments can be
122 specified with `firefox.Options#addArguments()`.
123* Changes to `firefox.Driver`
124 - Added installAddon(path)
125 - Added uninstallAddon(id)
126* Changes to `firefox.Options`
127 - Now extends the `Capabilities` class
128 - Removed from/toCapabilities
129 - Removed setLoggingPreferences (was a no-op)
130 - setProfile now only accepts a path to an existing profile
131 - Added addExtensions
132 - Added setPreference
133* Removed the `firefox.Profile` class. All of its functionality is now
134 provided directly by `firefox.Options`
135* Removed the `firefox/binary` module
136* Removed the `firefox/profile` module
137* Changes to `safari.Options`
138 - Now extends the `Capabilities` class
139 - Removed from/toCapabilities
140 - Removed setCleanSession (was a no-op)
141* Changes to `lib/capabilities.Browser`:
142 - Removed several enum values.
143 - ANDROID (use Chrome for Android; see docs on the chrome module)
144 - IPAD (no support available)
145 - IPHONE (no support available)
146 - OPERA (use Chrome)
147 - PHANTOM_JS (use Chrome or Firefox in headless mode)
148 - HTMLUNIT (use Chrome or Firefox in headless mode)
149* Changes to `lib/capabilities.Capabilities`:
150 - Removed static factory methods android(), ipad(), iphone(), opera(),
151 phantomjs(), htmlunit(), and htmlunitwithjs(). Users can still manually
152 configure capabilities for these, but their use is not recommended and
153 they will no longer be surfaced in the API.
154* Changes to `lib/error`:
155 - Added
156 - ElementClickInterceptedError
157 - InsecureCertificateError
158 - InvalidCoordinatesError
159 - NoSuchCookieError
160 - Removed
161 - ElementNotVisibleError
162 - InvalidElementCoordinatesError
163* Changes to `lib/webdriver.WebDriver`:
164 - Dropped support for "requiredCapabilities" from WebDriver.createSession
165 - actions() now returns the new `lib/input.Actions` class
166 - Removed touchActions
167 - Renamed schedule to execute
168 - Removed the `WebDriver.attachToSession()` factory method. Users can just
169 the `WebDriver` constructor directly instead.
170 - Removed the `call()` method. This was used to inject custom function calls
171 into the control flow. Now that the promise manager is no longer used,
172 this method is no longer necessary. Users are now responsible for
173 coordinating actions (ideally with async functions) and can just call
174 functions directly instead of through `driver.call()`.
175* Changes to `lib/webdriver.WebElement`:
176 - Replaced getSize & getLocation with getRect
177* Changes to `lib/webdriver.Alert`:
178 - Removed authenticateAs
179* Changes to `lib/webdriver.Options` (`driver.manage()`):
180 - Removed timeouts (use get/setTimeouts)
181* Changes to `lib/webdriver.Window` (`driver.manage().window()`):
182 - Added
183 - getRect
184 - setRect
185 - fullscreen
186 - minimize
187 - Removed (use the getRect/setRect methods)
188 - getPosition
189 - setPosition
190 - getSize
191 - setSize
192* Removed the `testing/assert` module
193* Changes to `testing/index`
194 - Since the promise manager has been removed, it is no longer necessary to
195 wrap the Mocha test hooks; instead, users can simply use async functions.
196 The following have all been removed:
197 - describe
198 - before
199 - beforeEach
200 - after
201 - afterEach
202 - it
203 - Added the `suite` function. For details, refer to the jsdoc or
204 `example/google_search_test.js`
205
206
207
208## v3.6.0
209
210### Bug Fixes
211
212* The Capabilities factory methods should only specify the name of the browser.
213* Protect against the remote end sometimes not returning a list to findElements
214 commands.
215* Properly reset state in `remote.DriverService#kill()`
216* The firefox module will no longer apply the preferences required by the legacy
217 FirefoxDriver. These preferences were only required when using the legacy
218 driver, support for which was dropped in v3.5.0.
219
220### API Changes
221
222* Added new methods to `selenium-webdriver/firefox.Options`:
223 - addArguments()
224 - headless()
225 - windowSize()
226* Deprecated `selenium-webdriver/firefox/binary.Binary`
227* Removed `selenium-webdriver/firefox.Options#useGeckoDriver()`
228* Removed the unused `selenium-webdriver/firefox/profile.decode()`
229* Removed methods from `selenium-webdriver/firefox/profile.Profile` that had
230 no effect since support for the legacy FirefoxDriver was dropped in 3.5.0:
231 - setNativeEventsEnabled
232 - nativeEventsEnabled
233 - getPort
234 - setPort
235* Removed `selenium-webdriver/firefox.ServiceBuilder#setFirefoxBinary()`; custom
236 binaries should be configured through the `firefox.Options` class.
237* Removed `selenium-webdriver/firefox.Capability`. These hold overs from the
238 legacy FirefoxDriver are no longer supported.
239
240### Changes for W3C WebDriver Spec Compliance
241
242* Deprecated `error.ElementNotVisibleError` in favor of the more generic
243 `error.ElementNotInteractableError`.
244* Support the `httpOnly` option when adding a cookie.
245
246
247## v3.5.0
248
249### Notice
250
251Native support for Firefox 45 (ESR) has been removed. Users will have to connect
252to a remote Selenium server that supports Firefox 45.
253
254### Changes
255
256* Removed native support for Firefox 46 and older.
257 - The `SELENIUM_MARIONETTE` enviornment variable no longer has an effect.
258 - `selenium-webdriver/firefox.Capability.MARIONETTE` is deprecated.
259 - `selenium-webdriver/firefox.Options#useGeckoDriver()` is deprecated and now a no-op.
260* `firefox.Options` will no longer discard the `"moz:firefoxOptions"` set in
261 user provided capabilities (via `Builder.withCapabilities({})`). When both
262 are used, the settings in `firefox.Options` will be applied _last_.
263* Added `chrome.Options#headless()` and `chrome.Options#windowSize()`, which
264 may be used to start Chrome in headless mode (requires Chrome 59+) and to set
265 the initial window size, respectively.
266
267
268### Changes for W3C WebDriver Spec Compliance
269
270* Added `error.WebDriverError#remoteStacktrace` to capture the stacktrace
271 reported by a remote WebDriver endpoint (if any).
272* Fixed `WebElement#sendKeys` to send text as a string instead of an array of
273 strings.
274
275## v3.4.0
276
277### Notice
278
279This release requires [geckodriver 0.15.0](https://github.com/mozilla/geckodriver/releases/tag/v0.15.0) or newer.
280
281### API Changes
282
283* Added `Options#getTimeouts()` for retrieving the currently configured session
284 timeouts (i.e. implicit wait). This method will only work with W3C compatible
285 WebDriver implementations.
286* Deprecated the `Timeouts` class in favor of `Options#setTimeouts()`, which
287 supports setting multiple timeouts at once.
288* Added support for emulating different network conditions (e.g., offline, 2G, WiFi) on Chrome.
289
290### Changes for W3C WebDriver Spec Compliance
291
292* Fixed W3C response parsing, which expects response data to always be a JSON
293 object with a `value` key.
294* Added W3C endpoints for interacting with various types of
295 [user prompts](https://w3c.github.io/webdriver/webdriver-spec.html#user-prompts).
296* Added W3C endpoints for remotely executing scripts.
297* Added W3C endpoints to get current window handle and all windows handles.
298
299
300## v3.3.0
301
302* Added warning log messages when the user creates new managed promises, or
303 schedules unchained tasks. Users may opt in to printing these log messages
304 with
305
306 ```js
307 const {logging} = require('selenium-webdriver');
308 logging.installConsoleHandler();
309 logging.getLogger('promise.ControlFlow').setLevel(logging.Level.WARNING);
310 ```
311* If the `JAVA_HOME` environment variable is set, use it to locate java.exe.
312
313
314## v3.2.0
315
316* Release skipped to stay in sync with the main Selenium project.
317
318
319## v3.1.0
320
321* The `lib` package is once again platform agnostic (excluding `lib/devmode`).
322* Deprecated `promise.when(value, callback, errback)`.
323 Use `promise.fulfilled(value).then(callback, errback)`
324* Changed `promise.fulfilled(value)`, `promise.rejected(reason)` and
325 `promise.defer()` to all use native promises when the promise manager is
326 disabled.
327* Properly handle W3C error responses to new session commands.
328* Updated `selenium-webdriver/testing` to export `describe.only` along with
329 `describe.skip`.
330* Fixed `selenium-webdriver/lib/until.ableToSwitchToFrame`. It was previously
331 dropping arguments and would never work.
332* Added the ability to use Firefox Nightly
333* If Firefox cannot be found in the default location, look for it on the PATH
334* Allow SafariDriver to use Safari Technology Preview.
335* Use the proper wire command for WebElement.getLocation() and
336 WebElement.getSize() for W3C compliant drivers.
337
338
339## v3.0.1
340
341* More API adjustments to align with native Promises
342 - Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)`
343 - Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)`
344* When a `wait()` condition times out, the returned promise will now be
345 rejected with an `error.TimeoutError` instead of a generic `Error` object.
346* `WebDriver#wait()` will now throw a TypeError if an invalid wait condition is
347 provided.
348* Properly catch unhandled promise rejections with an action sequence (only
349 impacts when the promise manager is disabled).
350
351
352## v3.0.0
353
354* (__NOTICE__) The minimum supported version of Node is now 6.9.0 LTS
355* Removed support for the SafariDriver browser extension. This has been
356 replaced by Apple's safaridriver, which is included wtih Safari 10
357 (available on OS X El Capitan and macOS Sierra).
358
359 To use Safari 9 or older, users will have to use an older version of Selenium.
360
361* geckodriver v0.11.0 or newer is now required for Firefox.
362* Fixed potential reference errors in `selenium-webdriver/testing` when users
363 create a cycle with mocha by running with mocha's `--hook` flag.
364* Fixed `WebDriver.switchTo().activeElement()` to use the correct HTTP method
365 for compatibility with the W3C spec.
366* Update the `selenium-webdriver/firefox` module to use geckodriver's
367 "moz:firefoxOptions" dictionary for Firefox-specific configuration values.
368* Extending the `selenium-webdriver/testing` module to support tests defined
369 using generator functions.
370* The promise manager can be disabled by setting an enviornment variable:
371 `SELENIUM_PROMISE_MANAGER=0`. This is part of a larger plan to remove the
372 promise manager, as documented at
373 <https://github.com/SeleniumHQ/selenium/issues/2969>
374* When communicating with a W3C-compliant remote end, use the atoms library for
375 the `WebElement.getAttribute()` and `WebElement.isDisplayed()` commands. This
376 behavior is consistent with the java, .net, python, and ruby clients.
377
378
379### API Changes
380
381 * Removed `safari.Options#useLegacyDriver()`
382 * Reduced the API on `promise.Thenable` for compatibility with native promises:
383 - Removed `#isPending()`
384 - Removed `#cancel()`
385 - Removed `#finally()`
386 * Changed all subclasses of `webdriver.WebDriver` to overload the static
387 function `WebDriver.createSession()` instead of doing work in the
388 constructor. All constructors now inherit the base class' function signature.
389 Users are still encouraged to use the `Builder` class instead of creating
390 drivers directly.
391 * `Builder#build()` now returns a "thenable" WebDriver instance, allowing users
392 to immediately schedule commands (as before), or issue them through standard
393 promise callbacks. This is the same pattern already employed for WebElements.
394 * Removed `Builder#buildAsync()` as it was redundant with the new semantics of
395 `build()`.
396
397
398
399## v3.0.0-beta-3
400
401* Fixed a bug where the promise manager would silently drop callbacks after
402 recovering from an unhandled promise rejection.
403* Added the `firefox.ServiceBuilder` class, which may be used to customize the
404 geckodriver used for `firefox.Driver` instances.
405* Added support for Safari 10 safaridriver. safaridriver may be disabled
406 via tha API, `safari.Options#useLegacyDriver`, to use the safari
407 extension driver.
408* Updated the `lib/proxy` module to support configuring a SOCKS proxy.
409* For the `promise.ControlFlow`, fire the "uncaughtException" event in a new
410 turn of the JS event loop. As a result of this change, any errors thrown by
411 an event listener will propagate to the global error handler. Previously,
412 this event was fired with in the context of a (native) promise callback,
413 causing errors to be silently suppressed in the promise chain.
414
415### API Changes
416
417* Added `remote.DriverService.Builder` as a base class for configuring
418 DriverService instances that run in a child-process. The
419 `chrome.ServiceBuilder`, `edge.ServiceBuilder`, and `opera.ServiceBuilder`
420 classes now all extend this base class with browser-specific options.
421* For each of the ServiceBuilder clases, renamed `usingPort` and
422 `withEnvironment` to `setPort` and `setEnvironment`, respectively.
423* Renamed `chrome.ServiceBuilder#setUrlBasePath` to `#setPath`
424* Changed the signature of the `firefox.Driver` from `(config, flow, executor)`
425 to `(config, executor, flow)`.
426* Exposed the `Condition` and `WebElementCondition` classes from the top-level
427 `selenium-webdriver` module (these were previously only available from
428 `lib/webdriver`).
429
430
431### Changes for W3C WebDriver Spec Compliance
432
433* Updated command mappings for [getting](https://w3c.github.io/webdriver/webdriver-spec.html#get-window-position)
434 and [setting](https://w3c.github.io/webdriver/webdriver-spec.html#set-window-position)
435 the window position.
436
437
438## v3.0.0-beta-2
439
440### API Changes
441
442* Moved the `builder.Builder` class into the main module (`selenium-webdriver`).
443* Removed the `builder` module.
444* Fix `webdriver.WebDriver#setFileDetector` when driving Chrome or Firefox on a
445 remote machine.
446
447
448## v3.0.0-beta-1
449
450* Allow users to set the agent used for HTTP connections through
451 `builder.Builder#usingHttpAgent()`
452* Added new wait conditions: `until.urlIs()`, `until.urlContains()`,
453 `until.urlMatches()`
454* Added work around for [GeckoDriver bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1274924)
455 raising a type conversion error
456* Internal cleanup replacing uses of managed promises with native promises
457* Removed the mandatory use of Firefox Dev Edition, when using Marionette driver
458* Fixed timeouts' URL
459* Properly send HTTP requests when using a WebDriver server proxy
460* Properly configure proxies when using the geckodriver
461* `http.Executor` now accepts a promised client. The `builder.Builder` class
462 will now use this instead of a `command.DeferredExecutor` when creating
463 WebDriver instances.
464* For Chrome and Firefox, the `builder.Builder` class will always return an
465 instanceof `chrome.Driver` and `firefox.Driver`, respectively, even when
466 configured to use a remote server (from `builder.Builder#usingServer(url)`,
467 `SELENIUM_REMOTE_URL`, etc).
468
469### API Changes
470
471* `promise.Deferred` is no longer a thenable object.
472* `Options#addCookie()` now takes a record object instead of 7 individual
473 parameters. A TypeError will be thrown if addCookie() is called with invalid
474 arguments.
475* When adding cookies, the desired expiry must be provided as a Date or in
476 _seconds_ since epoch. When retrieving cookies, the expiration is always
477 returned in seconds.
478* Renamed `firefox.Options#useMarionette` to `firefox.Options#useGeckoDriver`
479* Removed deprecated modules:
480 - `selenium-webdriver/error` (use `selenium-webdriver/lib/error`,\
481 or the `error` property exported by `selenium-webdriver`)
482 - `selenium-webdriver/executors` — this was not previously deprecated, but
483 is no longer used.
484* Removed deprecated types:
485 - `command.DeferredExecutor` — this was not previously deprecated, but is no
486 longer used. It can be trivially implemented by clients should it be
487 needed.
488 - `error.InvalidSessionIdError` (use `error.NoSuchSessionError`)
489 - `executors.DeferredExecutor`
490 - `until.Condition` (use `webdriver.Condition`)
491 - `until.WebElementCondition` (use `webdriver.WebElementCondition`)
492 - `webdriver.UnhandledAlertError` (use `error.UnexpectedAlertOpenError`)
493* Removed deprecated functions:
494 - `Deferred#cancel()`
495 - `Deferred#catch()`
496 - `Deferred#finally()`
497 - `Deferred#isPending()`
498 - `Deferred#then()`
499 - `Promise#thenCatch()`
500 - `Promise#thenFinally()`
501 - `WebDriver#isElementPresent()`
502 - `WebElement#getInnerHtml()`
503 - `WebElement#getOuterHtml()`
504 - `WebElement#getRawId()`
505 - `WebElement#isElementPresent()`
506* Removed deprecated properties:
507 - `WebDriverError#code`
508
509
510## v2.53.2
511
512* Changed `io.exists()` to return a rejected promise if the input path is not
513 a string
514* Deprecated `Promise#thenFinally()` - use `Promise#finally()`. The thenFinally
515 shim added to the promise module in v2.53.0 will be removed in v3.0
516 Sorry for the churn!
517* FIXED: capabilities serialization now properly handles undefined vs.
518 false-like values.
519* FIXED: properly handle responses from the remote end in
520 `WebDriver.attachToSession`
521
522## v2.53.1
523
524* FIXED: for consistency with the other language bindings, `remote.FileDetector`
525 will ignore paths that refer to a directory.
526
527## v2.53.0
528
529### Change Summary
530
531* Added preliminary support for Marionette, Mozilla's WebDriver implementation
532 for Firefox. Marionette may be enabled via the API,
533 `firefox.Options#useMarionette`, or by setting the `SELENIUM_MARIONETTE`
534 environment variable.
535* Moved all logic for parsing and interpreting responses from the remote end
536 into the individual `command.Executor` implementations.
537* For consistency with the other Selenium language bindings,
538 `WebDriver#isElementPresent()` and `WebElement#isElementPresent()` have
539 been deprecated. These methods will be removed in v3.0. Use the findElements
540 command to test for the presence of an element:
541
542 driver.findElements(By.css('.foo')).then(found => !!found.length);
543* Added support for W3C-spec compliant servers.
544* For consistent naming, deprecating `error.InvalidSessionIdError` in favor of
545 `error.NoSuchSessionError`.
546* Moved the `error` module to `lib/error` so all core modules are co-located.
547 The top-level `error` module will be removed in v3.0.
548* Moved `until.Condition` and `until.WebElementCondition` to the webdriver
549 module to break a circular dependency.
550* Added support for setting the username and password in basic auth pop-up
551 dialogs (currently IE only).
552* Deprecated `WebElement#getInnerHtml()` and `WebEleemnt#getOuterHtml()`
553* Deprecated `Promise#thenCatch()` - use `Promise#catch()` instead
554* Deprecated `Promise#thenFinally()` - use `promise.thenFinally()` instead
555* FIXED: `io.findInPath()` will no longer match against directories that have
556 the same basename as the target file.
557* FIXED: `phantomjs.Driver` now takes a third argument that defines the path to
558 a log file to use for the phantomjs executable's output. This may be quickly
559 set at runtime with the `SELENIUM_PHANTOMJS_LOG` environment variable.
560
561### Changes for W3C WebDriver Spec Compliance
562
563* Changed `element.sendKeys(...)` to send the key sequence as an array where
564 each element defines a single key. The legacy wire protocol permits arrays
565 where each element is a string of arbitrary length. This change is solely
566 at the protocol level and should have no user-visible effect.
567
568
569## v2.52.0
570
571### Notice
572
573Starting with v2.52.0, each release of selenium-webdriver will support the
574latest _minor_ LTS and stable Node releases. All releases between the LTS and
575stable release will have best effort support. Further details are available in
576the selenium-webdriver package README.
577
578### Change Summary
579
580* Add support for Microsoft's Edge web browser
581* Added `webdriver.Builder#buildAsync()`, which returns a promise that will be
582 fulfilled with the newly created WebDriver instance once the associated
583 browser has been full initialized. This is purely a convenient alternative
584 to the existing build() method as the WebDriver class will always defer
585 commands until it has a fully created browser.
586* Added `firefox.Profile#setHost()` which may be used to set the host that
587 the FirefoxDriver's server listens for commands on. The server uses
588 "localhost" by default.
589* Added `promise.Promise#catch()` for API compatibility with native Promises.
590 `promise.Promise#thenCatch()` is not yet deprecated, but it simply
591 delegates to `catch`.
592* Changed some `io` operations to use native promises.
593* Changed `command.Executor#execute()` and `HttpClient#send()` to return
594 promises instead of using callback passing.
595* Replaced the `Serializable` class with an internal, Symbol-defined method.
596* Changed the `Capabilities` class to extend the native `Map` type.
597* Changed the `Capabilities.has(key)` to only test if a capability has been set
598 (Map semantics). To check whether the value is true, use `get(key)`.
599* Deprecated `executors.DeferredExecutor` in favor of
600 `lib/command.DeferredExecutor`.
601* API documentation is no longer distributed with the npm package, but remains
602 available at <http://seleniumhq.github.io/selenium/docs/api/javascript/>
603* Rewrote the `error` module to export an Error subtype for each type of error
604 defined in the [W3C WebDriver spec](https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors).
605* Changed the `http.Request` and `http.Response` classes to store headers in
606 maps instead of object literals.
607* Updated `ws` dependency to version `1.0.1`.
608* Removed fluent predicates "is" and "not" from the experimental
609 `testing/assert` module.
610* Wait conditions that locate an element, or that wait on an element's state,
611 will return a WebElementPromise.
612* Lots of internal clean-up to break selenium-webdriver's long standing
613 dependency on Google's Closure library.
614
615### Changes for W3C WebDriver Spec Compliance
616
617* Updated the `By` locators that are not in the W3C spec to delegated to using
618 CSS selectors: `By.className`, `By.id`, `By.name`, and `By.tagName`.
619
620
621## v2.49-51
622
623* _Releases skipped to stay in sync with the rest of the Selenium project_
624
625
626## v2.48.2
627
628* Added `WebElement#takeScreenshot()`.
629* More adjustments to promise callback tracking.
630
631## v2.48.1
632
633* FIXED: Adjusted how the control flow tracks promise callbacks to avoid a
634 potential deadlock.
635
636## v2.48.0
637
638* Node v0.12.x users must run with --harmony. _This is the last release that
639 will support v0.12.x_
640* FIXED: (Promise/A+ compliance) When a promise is rejected with a thenable,
641 the promise adopts the thenable as its rejection reason instead of waiting
642 for it to settle. The previous (incorrect) behavior was hidden by bugs in
643 the `promises-aplus-tests` compliance test suite that were fixed in version
644 `2.1.1`.
645* FIXED: the `webdriver.promise.ControlFlow` now has a consistent execution
646 order for tasks/callbacks scheduled in different turns of the JS event loop.
647 Refer to the `webdriver.promise` documentation for more details.
648* FIXED: do not drop user auth from the WebDriver server URL.
649* FIXED: a single `firefox.Binary` instance may be used to configure and
650 launch multiple FirefoxDriver sessions.
651
652 var binary = new firefox.Binary();
653 var options = new firefox.Options().setBinary(binary);
654 var builder = new Builder().setFirefoxOptions(options);
655
656 var driver1 = builder.build();
657 var driver2 = builder.build();
658
659* FIXED: zip files created for transfer to a remote WebDriver server are no
660 longer compressed. If the zip contained a file that was already compressed,
661 the server would return an "invalid code lengths set" error.
662* FIXED: Surfaced the `loopback` option to `remote/SeleniumServer`. When set,
663 the server will be accessed using the current host's loopback address.
664
665## v2.47.0
666
667### Notice
668
669This is the last release for `selenium-webdriver` that will support ES5.
670Subsequent releases will depend on ES6 features that are enabled by
671[default](https://nodejs.org/en/docs/es6/) in Node v4.0.0. Node v0.12.x will
672continue to be supported, but will require setting the `--harmony` flag.
673
674### Change Summary
675
676* Add support for [Node v4.0.0](https://nodejs.org/en/blog/release/v4.0.0/)
677 * Updated `ws` dependency from `0.7.1` to `0.8.0`
678* Bumped the minimum supported version of Node from `0.10.x` to `0.12.x`. This
679 is in accordance with the Node support policy established in `v2.45.0`.
680
681## v2.46.1
682
683* Fixed internal module loading on Windows.
684* Fixed error message format on timeouts for `until.elementLocated()`
685 and `until.elementsLocated()`.
686
687## v2.46.0
688
689* Exposed a new logging API via the `webdriver.logging` module. For usage, see
690 `example/logging.js`.
691* Added support for using a proxy server for WebDriver commands.
692 See `Builder#usingWebDriverProxy()` for more info.
693* Removed deprecated functions:
694 * Capabilities#toJSON()
695 * UnhandledAlertError#getAlert()
696 * chrome.createDriver()
697 * phantomjs.createDriver()
698 * promise.ControlFlow#annotateError()
699 * promise.ControlFlow#await()
700 * promise.ControlFlow#clearHistory()
701 * promise.ControlFlow#getHistory()
702* Removed deprecated enum values: `ErrorCode.NO_MODAL_DIALOG_OPEN` and
703 `ErrorCode.MODAL_DIALOG_OPENED`. Use `ErrorCode.NO_SUCH_ALERT` and
704 `ErrorCode.UNEXPECTED_ALERT_OPEN`, respectively.
705* FIXED: The `promise.ControlFlow` will maintain state for promise chains
706 generated in a loop.
707* FIXED: Correct serialize target elements used in an action sequence.
708* FIXED: `promise.ControlFlow#wait()` now has consistent semantics for an
709 omitted or 0-timeout: it will wait indefinitely.
710* FIXED: `remote.DriverService#start()` will now fail if the child process dies
711 while waiting for the server to start accepting requests. Previously, start
712 would continue to poll the server address until the timeout expired.
713* FIXED: Skip launching Firefox with the `-silent` flag to preheat the profile.
714 Starting with Firefox 38, this would cause the browser to crash. This step,
715 which was first introduced for Selenium's java client back with Firefox 2,
716 no longer appears to be required.
717* FIXED: 8564: `firefox.Driver#quit()` will wait for the Firefox process to
718 terminate before deleting the temporary webdriver profile. This eliminates a
719 race condition where Firefox would write profile data during shutdown,
720 causing the `rm -rf` operation on the profile directory to fail.
721
722## v2.45.1
723
724* FIXED: 8548: Task callbacks are once again dropped if the task was cancelled
725 due to a previously uncaught error within the frame.
726* FIXED: 8496: Extended the `chrome.Options` API to cover all configuration
727 options (e.g. mobile emulation and performance logging) documented on the
728 ChromeDriver [project site](https://sites.google.com/a/chromium.org/chromedriver/capabilities).
729
730## v2.45.0
731
732### Important Policy Change
733
734Starting with the 2.45.0 release, selenium-webdriver will support the last
735two stable minor releases for Node. For 2.45.0, this means Selenium will
736support Node 0.10.x and 0.12.x. Support for the intermediate, un-stable release
737(0.11.x) is "best-effort". This policy will be re-evaluated once Node has a
738major version release (i.e. 1.0.0).
739
740### Change Summary
741
742* Added native browser support for Internet Explorer, Opera 26+, and Safari
743* With the release of [Node 0.12.0](http://blog.nodejs.org/2015/02/06/node-v0-12-0-stable/)
744 (finally!), the minimum supported version of Node is now `0.10.x`.
745* The `promise` module is now [Promises/A+](https://promisesaplus.com/)
746 compliant. The biggest compliance change is that promise callbacks are now
747 invoked in a future turn of the JS event loop. For example:
748
749 var promise = require('selenium-webdriver').promise;
750 console.log('start');
751 promise.fulfilled().then(function() {
752 console.log('middle');
753 });
754 console.log('end');
755
756 // Output in selenium-webdriver@2.44.0
757 // start
758 // middle
759 // end
760 //
761 // Output in selenium-webdriver@2.45.0
762 // start
763 // end
764 // middle
765
766 The `promise.ControlFlow` class has been updated to track the asynchronous
767 breaks required by Promises/A+, so there are no changes to task execution
768 order.
769* Updated how errors are annotated on failures. When a task fails, the
770 stacktrace from when that task was scheduled is appended to the rejection
771 reason with a `From: ` prefix (if it is an Error object). For example:
772
773 var driver = new webdriver.Builder().forBrowser('chrome').build();
774 driver.get('http://www.google.com/ncr');
775 driver.call(function() {
776 driver.wait(function() {
777 return driver.isElementPresent(webdriver.By.id('not-there'));
778 }, 2000, 'element not found');
779 });
780
781 This code will fail an error like:
782
783 Error: element not found
784 Wait timed out after 2002ms
785 at <stack trace>
786 From: Task: element not found
787 at <stack trace>
788 From: Task: WebDriver.call(function)
789 at <stack trace>
790
791* Changed the format of strings returned by `promise.ControlFlow#getSchedule`.
792 This function now accepts a boolean to control whether the returned string
793 should include the stacktraces for when each task was scheduled.
794* Deprecating `promise.ControlFlow#getHistory`,
795 `promise.ControlFlow#clearHistory`, and `promise.ControlFlow#annotateError`.
796 These functions were all intended for internal use and are no longer
797 necessary, so they have been made no-ops.
798* `WebDriver.wait()` may now be used to wait for a promise to resolve, with
799 an optional timeout. Refer to the API documentation for more information.
800* Added support for copying files to a remote Selenium via `sendKeys` to test
801 file uploads. Refer to the API documentation for more information. Sample
802 usage included in `test/upload_test.js`
803* Expanded the interactions API to include touch actions.
804 See `WebDriver.touchActions()`.
805* FIXED: 8380: `firefox.Driver` will delete its temporary profile on `quit`.
806* FIXED: 8306: Stack overflow in promise callbacks eliminated.
807* FIXED: 8221: Added support for defining custom command mappings. Includes
808 support for PhantomJS's `executePhantomJS` (requires PhantomJS 1.9.7 or
809 GhostDriver 1.1.0).
810* FIXED: 8128: When the FirefoxDriver marshals an object to the page for
811 `executeScript`, it defines additional properties (required by the driver's
812 implementation). These properties will no longer be enumerable and should
813 be omitted (i.e. they won't show up in JSON.stringify output).
814* FIXED: 8094: The control flow will no longer deadlock when a task returns
815 a promise that depends on the completion of sub-tasks.
816
817## v2.44.0
818
819* Added the `until` module, which defines common explicit wait conditions.
820 Sample usage:
821
822 var firefox = require('selenium-webdriver/firefox'),
823 until = require('selenium-webdriver/until');
824
825 var driver = new firefox.Driver();
826 driver.get('http://www.google.com/ncr');
827 driver.wait(until.titleIs('Google Search'), 1000);
828
829* FIXED: 8000: `Builder.forBrowser()` now accepts an empty string since some
830 WebDriver implementations ignore the value. A value must still be specified,
831 however, since it is a required field in WebDriver's wire protocol.
832* FIXED: 7994: The `stacktrace` module will not modify stack traces if the
833 initial parse fails (e.g. the user defined `Error.prepareStackTrace`)
834* FIXED: 5855: Added a module (`until`) that defines several common conditions
835 for use with explicit waits. See updated examples for usage.
836
837## v2.43.5
838
839* FIXED: 7905: `Builder.usingServer(url)` once again returns `this` for
840 chaining.
841
842## v2.43.2-4
843
844* No changes; version bumps while attempting to work around an issue with
845 publishing to npm (a version string may only be used once).
846
847## v2.43.1
848
849* Fixed an issue with flakiness when setting up the Firefox profile that could
850 prevent the driver from initializing properly.
851
852## v2.43.0
853
854* Added native support for Firefox - the Java Selenium server is no longer
855 required.
856* Added support for generator functions to `ControlFlow#execute` and
857 `ControlFlow#wait`. For more information, see documentation on
858 `webdriver.promise.consume`. Requires harmony support (run with
859 `node --harmony-generators` in `v0.11.x`).
860* Various improvements to the `Builder` API. Notably, the `build()` function
861 will no longer default to attempting to use a server at
862 `http://localhost:4444/wd/hub` if it cannot start a browser directly -
863 you must specify the WebDriver server with `usingServer(url)`. You can
864 also set the target browser and WebDriver server through a pair of
865 environment variables. See the documentation on the `Builder` constructor
866 for more information.
867* For consistency with the other language bindings, added browser specific
868 classes that can be used to start a browser without the builder.
869
870 var webdriver = require('selenium-webdriver')
871 chrome = require('selenium-webdriver/chrome');
872
873 // The following are equivalent.
874 var driver1 = new webdriver.Builder().forBrowser('chrome').build();
875 var driver2 = new chrome.Driver();
876
877* Promise A+ compliance: a promise may no longer resolve to itself.
878* For consistency with other language bindings, deprecated
879 `UnhandledAlertError#getAlert` and added `#getAlertText`.
880 `getAlert` will be removed in `2.45.0`.
881* FIXED: 7641: Deprecated `ErrorCode.NO_MODAL_DIALOG_OPEN` and
882 `ErrorCode.MODAL_DIALOG_OPENED` in favor of the new
883 `ErrorCode.NO_SUCH_ALERT` and `ErrorCode.UNEXPECTED_ALERT_OPEN`,
884 respectively.
885* FIXED: 7563: Mocha integration no longer disables timeouts. Default Mocha
886 timeouts apply (2000 ms) and may be changed using `this.timeout(ms)`.
887* FIXED: 7470: Make it easier to create WebDriver instances in custom flows for
888 parallel execution.
889
890## v2.42.1
891
892* FIXED: 7465: Fixed `net.getLoopbackAddress` on Windows
893* FIXED: 7277: Support `done` callback in Mocha's BDD interface
894* FIXED: 7156: `Promise#thenFinally` should not suppress original error
895
896## v2.42.0
897
898* Removed deprecated functions `Promise#addCallback()`,
899 `Promise#addCallbacks()`, `Promise#addErrback()`, and `Promise#addBoth()`.
900* Fail with a more descriptive error if the server returns a malformed redirect
901* FIXED: 7300: Connect to ChromeDriver using the loopback address since
902 ChromeDriver 2.10.267517 binds to localhost by default.
903* FIXED: 7339: Preserve wrapped test function's string representation for
904 Mocha's BDD interface.
905
906## v2.41.0
907
908* FIXED: 7138: export logging API from webdriver module.
909* FIXED: 7105: beforeEach/it/afterEach properly bind `this` for Mocha tests.
910
911## v2.40.0
912
913* API documentation is now included in the docs directory.
914* Added utility functions for working with an array of promises:
915 `promise.all`, `promise.map`, and `promise.filter`
916* Introduced `Promise#thenCatch()` and `Promise#thenFinally()`.
917* Deprecated `Promise#addCallback()`, `Promise#addCallbacks()`,
918 `Promise#addErrback()`, and `Promise#addBoth()`.
919* Removed deprecated function `webdriver.WebDriver#getCapability`.
920* FIXED: 6826: Added support for custom locators.
921
922## v2.39.0
923
924* Version bump to stay in sync with the Selenium project.
925
926## v2.38.1
927
928* FIXED: 6686: Changed `webdriver.promise.Deferred#cancel()` to silently no-op
929 if the deferred has already been resolved.
930
931## v2.38.0
932
933* When a promise is rejected, always annotate the stacktrace with the parent
934 flow state so users can identify the source of an error.
935* Updated tests to reflect features not working correctly in the SafariDriver
936 (cookie management and proxy support; see issues 5051, 5212, and 5503)
937* FIXED: 6284: For mouse moves, correctly omit the x/y offsets if not
938 specified as a function argument (instead of passing (0,0)).
939* FIXED: 6471: Updated documentation on `webdriver.WebElement#getAttribute`
940* FIXED: 6612: On Unix, use the default IANA ephemeral port range if unable to
941 retrieve the current system's port range.
942* FIXED: 6617: Avoid triggering the node debugger when initializing the
943 stacktrace module.
944* FIXED: 6627: Safely rebuild chrome.Options from a partial JSON spec.
945
946## v2.37.0
947
948* FIXED: 6346: The remote.SeleniumServer class now accepts JVM arguments using
949 the `jvmArgs` option.
950
951## v2.36.0
952
953* _Release skipped to stay in sync with main Selenium project._
954
955## v2.35.2
956
957* FIXED: 6200: Pass arguments to the Selenium server instead of to the JVM.
958
959## v2.35.1
960
961* FIXED: 6090: Changed example scripts to use chromedriver.
962
963## v2.35.0
964
965* Version bump to stay in sync with the Selenium project.
966
967## v2.34.1
968
969* FIXED: 6079: The parent process should not wait for spawn driver service
970 processes (chromedriver, phantomjs, etc.)
971
972## v2.34.0
973
974* Added the `selenium-webdriver/testing/assert` module. This module
975 simplifies writing assertions against promised values (see
976 example in module documentation).
977* Added the `webdriver.Capabilities` class.
978* Added native support for the ChromeDriver. When using the `Builder`,
979 requesting chrome without specifying a remote server URL will default to
980 the native ChromeDriver implementation. The
981 [ChromeDriver server](https://code.google.com/p/chromedriver/downloads/list)
982 must be downloaded separately.
983
984 // Will start ChromeDriver locally.
985 var driver = new webdriver.Builder().
986 withCapabilities(webdriver.Capabilities.chrome()).
987 build();
988
989 // Will start ChromeDriver using the remote server.
990 var driver = new webdriver.Builder().
991 withCapabilities(webdriver.Capabilities.chrome()).
992 usingServer('http://server:1234/wd/hub').
993 build();
994
995* Added support for configuring proxies through the builder. For examples, see
996 `selenium-webdriver/test/proxy_test`.
997* Added native support for PhantomJS.
998* Changed signature of `SeleniumServer` to `SeleniumServer(jar, options)`.
999* Tests are now included in the npm published package. See `README.md` for
1000 execution instructions
1001* Removed the deprecated `webdriver.Deferred#resolve` and
1002 `webdriver.promise.resolved` functions.
1003* Removed the ability to connect to an existing session from the Builder. This
1004 feature is intended for use with the browser-based client.
1005
1006## v2.33.0
1007
1008* Added support for WebDriver's logging API
1009* FIXED: 5511: Added webdriver.manage().timeouts().pageLoadTimeout(ms)
1010
1011## v2.32.1
1012
1013* FIXED: 5541: Added missing return statement for windows in
1014 `portprober.findFreePort()`
1015
1016## v2.32.0
1017
1018* Added the `selenium-webdriver/testing` package, which provides a basic
1019 framework for writing tests using Mocha. See
1020 `selenium-webdriver/example/google_search_test.js` for usage.
1021* For Promises/A+ compatibility, backing out the change in 2.30.0 that ensured
1022 rejections were always Error objects. Rejection reasons are now left as is.
1023* Removed deprecated functions originally scheduled for removal in 2.31.0
1024 * promise.Application.getInstance()
1025 * promise.ControlFlow#schedule()
1026 * promise.ControlFlow#scheduleTimeout()
1027 * promise.ControlFlow#scheduleWait()
1028* Renamed some functions for consistency with Promises/A+ terminology. The
1029 original functions have been deprecated and will be removed in 2.34.0:
1030 * promise.resolved() -> promise.fulfilled()
1031 * promise.Deferred#resolve() -> promise.Deferred#fulfill()
1032* FIXED: remote.SeleniumServer#stop now shuts down within the active control
1033 flow, allowing scripts to finish. Use #kill to shutdown immediately.
1034* FIXED: 5321: cookie deletion commands
1035
1036## v2.31.0
1037
1038* Added an example script.
1039* Added a class for controlling the standalone Selenium server (server
1040available separately)
1041* Added a portprober for finding free ports
1042* FIXED: WebElements now belong to the same flow as their parent driver.
1043
1044## v2.30.0
1045
1046* Ensures promise rejections are always Error values.
1047* Version bump to keep in sync with the Selenium project.
1048
1049## v2.29.1
1050
1051* Fixed a bug that could lead to an infinite loop.
1052* Added a README.md
1053
1054## v2.29.0
1055
1056* Initial release for npm:
1057
1058 npm install selenium-webdriver
1059
\No newline at end of file