Protractor v2.0.0 Release Notes
-
Why is this change version 2.0? Protractor is following semver, and there's some breaking changes here.
⬆️ Dependency Version Upgrades
- (34f0eeb) fix(element): update to [email protected] and remove element.then
This change updates the version of WebDriverJS (selenium-webdriver node module) from 2.44 to 2.45.1. See the full changelog at https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md
- (8976e75) chore(jasmine): bump version of jasminewd2
🔋 Features
(997937d) feat(console plugin): Added new console plugin
(ef6a09d) feat(webdriver-manager): allow a custom cdn for binaries
Added a cdn value for each binary to be overrided by the cli argument
alternate_cdn
.🐛 Bug Fixes
- (fb92be6) fix(accessibility): improve output for long elements
Instead of just printing the first N characters of the element's template, print the first and last N/2.
See #1854
(2a765c7) fix(element): return not present when an element disappears
(8a3412e) fix(bug): by.buttonText() should not be effected by CSS style
Closes issue #1904
(5d23280) fix(debugger): fix issue where output does not display circular dep and functions
(ef0fbc0) fix(debugger): expose require into debugger
💥 Breaking Changes
- (34f0eeb) fix(element): update to [email protected] and remove element.then
This change updates the version of WebDriverJS (selenium-webdriver node module) from 2.44 to 2.45.1. See the full changelog at https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md
To enable the update and remove confusion, this removes the
element().then
function unless there is an action result. This function is completely unnecessary, because it would always resolve to itself, but the removal may cause breaking changes.Before:
element(by.css('foo')).then(function(el) { return el.getText().then(...); });
After:
element(by.css('foo')).getText().then(...);
In other words, an ElementFinder is now no longer a promise until an action has been called.
Before:
var el = element(by.css('foo')); protractor.promise.isPromise(el); // true protractor.promise.isPromise(el.click()); // true
After:
var el = element(by.css('foo')); protractor.promise.isPromise(el); // false protractor.promise.isPromise(el.click()); // true
Also, fixes
filter
andmap
to work with the new WebDriverJS.- (3c04858)
chore(config): remove deprecated
chromeOnly
This has been replaced with
directConnect
.- Due to (1159612)
Due to changes in how scheduling works on the control flow, specs in Jasmine1 will no longer wait for multiple commands scheduled in
onPrepare
or in the global space of the test file.Before:
onPrepare: function() { browser.driver.manage().window().maximize(); // This second command will not finish before the specs start. browser.get('http://juliemr.github.io/protractor-demo'); }
To fix, return the last promise from onPrepare:
After:
onPrepare: function() { browser.driver.manage().window().maximize(); return browser.get('http://juliemr.github.io/protractor-demo'); }
- Due to (1159612)
Due to changes in WebDriverJS,
wait
without a timeout will now default to waiting for 0 ms instead of waiting indefinitely.Before:
browser.wait(fn); // would wait indefinitely
After
browser.wait(fn, 8000) // to fix, add an explicit timeout
This will be reverted in the next version of WebDriverJS.