Latest Protractor v0.24.2 is out. Take a look at at the main features and bug fixes. Stay up to date!
(a43f983) fix(protractor): make ElementFinder.then resolve to itself instead of null
(31d42a3) fix(protractor): throw index-out-of-bounds
- to make error more specific instead of propagate later
(59af936) fix(locators): Missing information in warning/error messages
Webdriver’s built-in locators (such as
by.css()) appeared as ‘undefined’ in protractor’s messages.
For instance, if a locator matched multiple elements, protractor would print the following message: ‘warning: more than one element found for locator undefined- you may need to be more specific’.
(13373f5) fix(launcher): output error messages when child processes exit with error
Version 0.24.0 introduced a bug where child processes would error without outputting the error message. Fix. See #902.
(72668fe) fix(cssShortcut): fix $$ global throwing error
(7299155) feat(sauceprovider): append spec filename to capabilities.name
(f22456d) refactor(jasminewd): use jasminewd from its own node module
The Jasmine Webdriver Adapter is now its own npm module. The code has been moved to http://www.github.com/angular/jasminewd.
Remove the code from Protractor, and add a dependency on firstname.lastname@example.org.
(f23565d) feat(protractor): new API allowAnimations(bool) on protractor elements.
(876a3c0) feat(runner): support running dart2js spec files
This commit supports running Dart2JS output in NodeJS. Officially, Dart2JS in supposed to only generate code for running in a real webbrowser. With this patch, the dart2js code can also be executed in NodeJS.
(8d46e21) feat(runner): support sourcemaps in spec files
This feature allows folks who are generating their spec files from a different language to see stack traces that use the line numbers from their sources before translation.
This commit introduces a dependency on the
For general information about sourcemaps, refer:
(56daa54) fix(clientsidescripts): convert non-Error exceptions to Errors
If any functions called by clientSideScripts throws a an exception that doesn’t inherit from
Error, the stack trace is completely unhelpful and the message is just “unknown error.” This commit wraps such errors into
Errorinstances so that we have meaningful stack traces and the correct exception message. (e.g. This is the common case when running dart2js code. This commit gives us the Dart stack trace and exception message.)
In addition, I’ve pushed the construction of the string to install into the browser into clientsidescripts.js.
(00c6abe) fix(element): fix WebElement.$ using the incorrect By object
(0500b2c) fix(navigation): ignore unknown JS errors when looking for the URL
This should address #841
Ignoring the error and trying again has worked for all of my test cases, and the error has never occurred more than once in a row.
(c8c85e0) fix(locators): fix by.repeater finding all rows for IE
Previously, element.all(by.repeater(‘foo in foos’)) would find non-element nodes for ng-repeat-start elements, which could cause IEDriver to fall over if the test tried to get text from those nodes.
(3c0e727) refactor(protractor): reorganize internal structure of elementFinder/webelement
Allow chaining of actions (i.e.
first(), last(), and get(index) are not executed immediately, allowing them to be placed in page objects
Rework the way that elementFinder and wrappedWebElement is represented
Breaking changes: - element.all is chained differently Before: element(By.x).element.all(By.y) Now: element(By.x).all(By.y)
However, using element.all without chaining did not change, i.e. `element.all(By.x)`
- Changed the way for retrieving underlying webElements Before: element(By.x).find(), element(By.x).findElement(By.y), and element(By.x).findElements(By.y) Now: element(By.x).getWebElement(), element(By.x).element(By.y).getWebElement(), and element(By.x).element(By.y).getWebElements(), respectively
- browser.findElement returns a raw WebElement so $, $$, and evaluate will no longer be available
(fbfc72b) feat(launcher): Add support for maxSession
- add support for maxSession and capability-specific specs
- cleaned up launcher (refactored out taskScheduler.js)
- Breaking change: - changed the config to shard test files; also sharding is specific to capabilities now Before: config.splitTestsBetweenCapabilities Now: config.capabilities.shardTestFiles or config.multiCapabilities[index].shardTestFiles
(9e5d9e4) feat(locators): remove deprecated locator APIs
This is a breaking change. The following deprecated Locator APIs have been removed.
textareacan be replaced by
element(by.selectedOption('foo'))can be replaced by