Protractor - 0.24.2 is out

Latest Protractor v0.24.2 is out. Take a look at at the main features and bug fixes. Stay up to date!

0.24.2

Bug Fixes

  • (a43f983) fix(protractor): make ElementFinder.then resolve to itself instead of null

  • (31d42a3) fix(protractor): throw index-out-of-bounds

    See https://github.com/angular/protractor/issues/915

    • to make error more specific instead of propagate later

0.24.1

Bug Fixes

  • (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

0.24.0

Features

  • (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 jasminewd@1.0.0.

  • (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.

    Ref: https://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/sdk/lib/js/dart2js/js_dart2js.dart?spec=svn32943&r=32943#487

  • (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 source-map-support library.

    For general information about sourcemaps, refer:

    • http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/
    • https://github.com/evanw/node-source-map-support
    • https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/view

Bug Fixes

  • (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 Error instances 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

    Closes #852

  • (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.

Breaking Changes

  • (3c0e727) refactor(protractor): reorganize internal structure of elementFinder/webelement

    • Allow chaining of actions (i.e. element(By.x).clear().sendKeys('abc))

    • 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.

    • by.input
    • by.select
    • by.selectedOption
    • by.textarea

    input, select, and textarea can be replaced by by.model.

    element(by.selectedOption('foo')) can be replaced by element(by.model('foo')).$('option:checked')

comments powered by Disqus