Protractor - 1.5.0 is out

Latest Protractor v1.5.0 is out. Take a look at at the features and bug fixes from last version. Stay up to date!

1.5.0

Features

  • (55a91ea) feat(launcher): reorganize launcher + add option to store test results as JSON

    You may now use ‘config.resultJsonOutputFile’ to specify a location for output. See docs/referenceConf.js for more usage.

  • (6a88642) feat(plugins): basic tools for adding plugins

  • (2572feb) feat(plugin): ngHint plugin

    For information on usage, see ‘plugins/ngHintPlugin.js’. More documentation on plugins will be added soon.

  • (0bbfd2b) feat(protractor/runner): allow multiple browser in test

    Closes https://github.com/angular/protractor/issues/381 Usage: ‘browser.forkNewDriverInstance’.

  • (8b5ae8b) feat(troubleshoot): Add more information when the –troubleshoot flag is used

    Improve error messages and add debug info when

    • the configuration file cannot be parsed
    • a webdriver session cannot be started
    • more than one element is found using ‘element’

    Unify format used for warnings and errors.

Bug Fixes

  • (30023f2) fix(runner): setTestPreparer does not work

    setTestPreparer would always set the testPrepare to config.onprepare during ‘runner.run()’. This is breaking for code that relies on setTestPreparer directly.

  • (47f12ba) fix(clientsidescripts): make findByCssContainingText tolerate elements with no textContent/innerText

  • (6a9b87c) fix(elementexplorer): eval always treat result as promise

  • (289dbb9) fix(util): properly handle exceptions from onPrepare and onExit

  • (a132fac) fix(jasmine): fix errors when iit was used

    Errors were due to Jasmine not calling reportSpecStarting when iit was used, but calling reportSpecResults.

    Closes #1602

Breaking Changes

  • (0bbfd2b) feat(protractor/runner): allow multiple browser in test

    ‘protractor.getInstance()’ had been unused (replaced by global ‘browser’ in v0.12.0) and is now removed.

1.4.0

Features

  • (adef9b2) feat(runner): add a new method of getting browser drivers - directConnect

    directConnect as an option on the configuration will replace chromeOnly. Now, WebDriverJS allows Firefox to be used directly as well, so directConnect will work for Chrome and Firefox, and throw an error if another browser is used.

    This change deprecates but does not remove the chromeOnly option.

  • (0626963) feat(config): Option to exclude test for specific capability

    Add the option to exclude spec files for a specific capability. This way you can ignore spec files for one capability only. For example if the test is known to fail in the capability.

    Closes #1230

  • (710cad7) feat(runner/frameworks): Change interface contract of the protractor runner instance so that it returns a promise instead of calling a callback function

  • (50f44f4) feat(protractor): add clone methods for ElementFinder and ElementArrayFinder

  • (eedf50b) feat(launcher): add beforeLaunch and afterLaunch

  • (8dd60b7) feat(protractor): wrap negative indices for ElementArrayFinder.get(i)

    Closes #1213

  • (be236e7) feat(debugging): use custom messages when executing scripts to improve stack traces

    Now, instead of asynchronous events during executeScript all being described as ‘WebDriver.executeScript’, they have their own custom messages. The schedule shown when debugging will be more informative.

Dependency Version Upgrades

  • (889a5a7) feat(webdriver): version bumps for webdriver, chromedriver, webdriverJS

    Upgrade to WebDriver 2.44.0 and ChromeDriver 2.12.

Bug Fixes

  • (2fbaf52) fix(element): use the root element only to find the testability API, not scope searches

    In 9a8f45a a change was introduced which made Protractor’s custom locators (by.binding, by.model, etc) use config.rootElement as the root for all their searches. This meant that config.rootElement was used both to specify how to get hold of Angular’s injector as well as where to begin searching for elements. This does not work for all cases, for example if a dialog should be searched for elements but is a sibling, not a child, of ng-app.

    This reverts that change, and uses document as the parent for all searches. This is consistent with the behavior of the native locators by.id, by.css, and friends, which do not scope their search based on config.rootElement.

  • (9db5327) fix(ElementFinder): ElementFinder should allow null as success handler. Passes the value to the next in the chain.

  • (0858280) fix(locators): by.cssContainingText now operates on pre-transformed text

    Previously, the implementation depended on the browser. Now, it will always operate on the text before text-transform is applied. Closes #1217

  • (1a4eea4) fix(elementexplorer): elementexplorer hangs when returning ElementFinder

  • (f4e6b40) fix(runner): webdriver could get into lock when there is async promise

  • (cf284b9) fix(clientsidescripts): by.exactBinding not working because of regex typo

    Closes #1441

  • (9cc0f63) fix(runner): gracefully shutdown browsers after test

  • (86ead2c) fix(webdriver-manager): Avoid incompatibility between request with callback and pipe.

  • (7283fdf) fix(launcher): exit code is always 100 for sharded and 1 for nonsharded tests

1.3.1

Bug Fixes

  • (714e4e2) fix(locators): fix regression passing root element to locator scripts

    Closes #1378

1.3.0

Features

  • (4f1fe68) feat(runner): Allow onCleanup to accept a file

  • (548f0c0) feat(webdriver): bump WebDriver to version 2.43

  • (466b383) feat(protractor): allow advanced features for ElementArrayFinder

    changed ElementFinder as a subset of an ElementArrayFinder.

    This enables actions on ElementArrayFinders, such as: ‘element.all(by.css(‘.foo’)).click()’

    The function ‘filter’ now returns an ElementArrayFinder, so you may also do: ‘element.all(by.css(‘.foo’)).filter(filterFn).click()’

    or

    ‘element.all(by.css(‘.foo’)).filter(filterFn).last().click()’

  • (7bd2dde) chore(angular): upgrade angular to version 1.3.

    This change updates Protractor’s test application from 1.2.9 to 1.3.0-r0.

    There is a significant behind-the-scenes change in the implementation of locating elements and waiting for the page to be stable. If you are updating your application to Angular 1.3, you may run into some changes you will need to make in your tests:

    • ‘by.binding’ no longer allows using the surrounding ”. Previously, these were optional.

    • Prefixes ‘ng_’ and ‘x-ng-’ are no longer allowed for models. Use ‘ng-model’.

    • ‘by.repeater’ cannot find elements by row and column which are not children of the row.

  • (ee82f9e) feat(webdriver-manager): ignore ssl checks with –ignore_ssl option

    Allow ability to ignore SSL checks when downloading webdriver binaries. Usage: ‘webdriver-manager update –ignore_ssl’

Bug Fixes

  • (838f5a2) fix(element): isPresent should not throw on chained finders

    Now, ‘$(‘nonexistant’).$(‘foo’).isPresent()’ will return false instead of throwing an error. This change also adds tests that ensure that catching errors from promises works as expected.

Breaking Changes

  • (f7c3c37) feat(webdriver): update to WebDriverJS 2.43.5

    Breaking Changes WebDriverJS has introduced changes in the way that Promises are handled in version 2.43. See https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md - ‘webdriver.WebElement’ has now been split into ‘webdriver.WebElementPromise’ and ‘webdriver.WebElement’ so that it does not resolve to itself. This change should be largely transparent to users.

    • ‘WebElement.toWireValue’ has been removed.
comments powered by Disqus