Protractor v4.0.0 Release Notes

  • This version includes some big changes, so we've decided to make it version 4.0!

    • ๐Ÿ“ฆ webdriver-manager is now it's own NPM, so you can use it in your own projects. Protractor depends on it, though, so you shouldn't need to change โšก๏ธ anything. However, because it is a new dependency you'll need to rerun webdriver-manager update.

    • ๐Ÿ‘€ Protractor has TypeScript typings! See the example โœ… for details on how to use TypeScript in your tests.

    ๐Ÿ’ฅ Breaking changes

    • (d932ad7) chore(browser): rename protractor to browser and add a protractor namespace (#3214)

      • added wrapDriver method from the browser.ts and ExpectedConditions to the protractor namespace
      • imported selenium webdriver ActionSequence, Key, promise, Command, and CommandName to the protractor namespace
    • โšก๏ธ Selenium Webdriver has deprecated getInnerHtml and getOuterHtml. You'll need to update your tests to not use these methods.

    • Protractor node module no longer has a config.json file. This is now handled in the webdriver-manager node module and the files are also downloaded to the webdriver-manager/selenium folder.

    ๐Ÿ› Bug fixes

    • (d6910c1) fix(edge): Use resetUrl about:blank for MicrosoftEdge (#3267)

    • (f205518) fix(launcher): resolve promise for getMultiCapabilities (#3195)

    closes #3191

    • (f149bd1) fix(docs): Change extension for docs links to .ts (#3187)

    closes #3170

    • (67474e0) chore(configParser): allow non-glob file pattern (#2754)

    Cucumber allows line numbers to be passed in the filename in the form of features/some.feature:42. Glob expanding that results in an empty array and nothing being passed to the framework runner. This change checks for glob magic characters and only tries expanding it if found. Otherwise it just passes the filename verbatim. This was previously handled in [#2445] by stripping the line number first, but this is a more generic (non-cucumber) way to do it. Glob needed to be upgraded for this which resulted in a weird npm 3 bug. Removing the rimraf package resolved this. It was only used to generate documentation which itself was removed a while ago.

    • (f311320) fix(website): edit getText JSDoc for shortDescription (#3310)

    closes #3233

    • (ba63a92) fix(util): check stack exists before filtering the stack trace (#3309)

    closes #3224

    • (c86acd4) chore(website): fix website for items to appear properly (#3314)

      • Fix order for website (see #3163. Does not include $ / $$)
      • Replace @return with @returns so descriptions will appear
    • (e9b49f2) fix(config): do not flatten capabilities (#3291)

    This is no longer necessary in the latest version of selenium-webdriver. Without this change, --capabilities.chromeOptions.binary will do nothing, for example. Closes #3290

    ๐Ÿ”‹ Features

    • (78f3c64) chore(exitCodes): adding exit code for browser connect errors (#3133)

      • add exit code for browser connect errors
      • add exit code for browserstack error
      • add browser error for debug with multiple capabilities
      • use thrown stack traces for errors (instead of creating new ones) with captureStackTrace
      • allow for errors to suppress exit code for config parser thrown error
    • (85209f4) feat(webdriver): extract webdriver-manager into a separate node module (#3068)

    closes #607, #2402

    • Removed the config.json. This will be managed now by webdriver-manager.
    • Wedriver-manager downloads the file to the node_modules/webdriver-manager/selenium folder. This will no longer appear in the protractor directory.

      • (8316917) feat(expectedConditions): adding urlIs and urlContains (#3237)
    • adding urlIs and urlContains

    • tests for UrlIs and UrlContains

    โฌ†๏ธ Dependency Upgrades

    • (4353069) deps(outdated): Update outdated dependencies (#3251)

    Updated the following outdated packages: body-parser, chai, chai-as-promised, glob, jshint, mocha, request, saucelabs, typescript, typings

    • (a6cae73) deps(selenium): upgrade to selenium-webdriver 2.53.2 (#3223)

    closes #3173, closes #3167, closes #3058

    • (128f8e1) dep(webdrivermanager): upgrade to 10.1.0 (#3312)

    Other

    • (2a391bc) chore(es7): async/await example

    • (bb65e5a) chore(website): clean up documentation (#3334)

      • Remove getInnerHtml and getOuterHtml from inherited WebElement docs.
      • Remove some of the goog.provide. Only one is required to build the website.
    • (f5dc4f9) chore(example): add a protractor typescript example (#3323)