Protractor v0.24.0 Release Notes

  • ๐Ÿš€ Note: Major version 0 releases are for initial development, and backwards incompatible changes may be introduced at any time.

    ๐Ÿ”‹ 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 [email protected].

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

    ๐Ÿ› 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')