Skip to content

Latest commit

 

History

History
1242 lines (803 loc) · 55.3 KB

CHANGELOG.md

File metadata and controls

1242 lines (803 loc) · 55.3 KB

0.24.1

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

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

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

Features

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')

0.23.1

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

Bug Fixes

  • (59533d9) fix(navigation): revert changes to the page reset

    Navigating to an empty data URL won't work for internet explorer, sadly.

    Reverting to about:blank. Will watch for flakes and explore other options.

0.23.0

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

Features

  • (b7afa87) feat(addMockModule): allow additional parameters

    Allow Protractor’s 'addMockModule' method to pass context to its mocks, providing an argument to the script which overrides a module. Rely on the WebDriver’s 'executeScript' method.

    Closes #695

  • (546d41f) feat(sauceprovider): runner now prints a link to saucelabs test URL

  • (fd7fe4a) feat(launcher): Add support for splitTestsBetweenCapabilities.

  • (b93bf18) feat(elementFinder): keep a reference to the original locator

  • (98f4ba5) feat(locators): add by.exactBinding

Bug Fixes

  • (43ff9e5) fix(jasminewd): allow asynchronous callbacks for jasmine tests

    Closes #728, Closes #704

  • (6249efe) fix(webdriver-manager): use request module instead of http

    Google changed selenium-server-standalone.jar's location and is returning 302 http module does not follow redirects

    Closes #826

  • (95093c3) fix(configParser): don't run suite if specs are supplied

  • (27a5706) fix(loading): fix timeouts with about:blank removal

    As documented at teamcapybara/capybara#1215 there are sometimes issues with webdriver and about:blank pages.

    Switching instead to try a data url.

  • (cbcdb48) fix(runner): add -r for each cucumber require

  • (e36c32a) fix(jasminewd): Use promise.all to combine promises and done

    • Make the flow promise explicit and use promise.all to wait for both promises to be fulfilled before calling the done callback
  • (b5c18db) fix(drivers): prevent Sauce Labs login credentials from showing up in logs

    Closes #754

  • (b85af50) fix(protractor): change angular-bootstrap wrapper for navigation

  • (8abea3c) fix(jasminewd): fix timeout for beforeEach and afterEach

0.22.0

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

Features

  • (8b088fd) feat(locators): Added a By.cssContainingText locator.

    This new locator find elements by css selector and inner text in response to the lack of ':contains' selector.

    Example: By.cssContainingText('ul .pet', 'Dog') will find all ul children with class 'pet' containing the text 'Dog'.

    Closes #488, Closes #709

  • (54060b7) feat(protractor): add the browser.setLocation method to perform in-page navigation

    Allow a faster way to navigate within the app. The current browser.get method forces the entire app to load every time you navigate to a new page. The proposed browser.setLocation method uses the same format as $location.url().

    Closes #368

  • (74761e8) feat(cli): use protractor.conf.js as a default config file if none is passed

    Closes #615

Chores and updates

  • (b81cf5a) chore(webdriver): update WebDriverJS version to 2.41.0

  • (a96df4d) chore(minijasminenode): update to version 0.4.0.

    This allows the use of because('message') before expectations, to give additional information when a failure occurs.

    It also removes warnings for Node 0.11.* users about util.print being deprecated.

    Closes #377

  • (6f31b56) chore(package): npm start now brings up the testapp

    Closes #712

Bug Fixes

  • (1137d12) fix(mocha): fix it.only so that it does not double-wrap

    Closes #469

  • (bde56a0) fix(cli): fix --exclude command line flag

    Accidentally got changed to 'excludes'. As discussed earlier, should be single to be consistent with Karma.

    Closes #637

  • (9e426df) fix(locators): using $().$$() should return an ElementArrayFinder

    Prior, $(foo).$$(bar) would return a promise which resolved to an array of WebElements. This is unexpected, since $(foo).$(bar) returns an ElementFinder, and element(by.css(foo)).element.all(by.css(bar)) returns an ElementArrayFinder. Fixed so things are more consistent.

    Closes #640

  • (b67810a) fix(webdriver-manager): do not download files if HTTP response is not 200

    Closes #656

  • (28912f0) fix(webdriver-manager): fix download paths

0.21.0

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

Features

  • (0c4ef69) feat(launcher): launcher outputs a final summary of how the browsers did

  • (f1db8b4) feat(runner): make runner an event emitter and log passes or failures from the launcher

    Now, for runs with multiple capabilities, the launcher will output '.' or 'F' for each pass or fail instead of just '.' for every chunk of data. TODO - complete the event emitter API for the Cucumber runner.

  • (f9c4391) feat(cli+config): allow defining multiple test suites in the config and running them separately from the command line.

  • (06bd573) feat(pause): add the browser.pause method to enter a webdriver-specific debugger

    Warning: this is still beta, there may be issues. Usage: In test code, insert a browser.pause() statement. This will stop the test at that point in the webdriver control flow. No need to change the command line you use to start the test. Once paused, you can step forward, pausing before each webdriver command, and interact with the browser. Exit the debugger to continue the tests.

Bug Fixes

  • (43aff83) fix(pageload): Changing how about:blank unload waits Also changing executeScript script comment from // to /**/ format. These two small changes should not affect functionality but make Protractor work with Selendroid.

  • (1334662) fix(locators): Improve custom locators message

    Increase readability of custom locator message by displaying each argument instead of the arguments object.

  • (c9dbbaa) refactor(launcher): skip the child process if only one capability is requested

    Closes #603

  • (26d67a2) fix(launcher): launcher should report a failure when only one capability is running

  • (9530a0c) (fix): Convert test.sh to test.js

    This would enable the tests to be run on both Linux and Windows.

  • (6d85ab4) fix(jasminewd): display stack traces in correct order and with WebElement method failure details

  • (8964ac9) fix(test): Fixed path of configuration file to pass on windows

  • (99bda1a) fix(waitForAngular): when timeout overflows, at least pass the negative to error messages

    Closes #622

  • (4fd060a) fix (element): Allow ElementFinder to be passed to actions directly.

    Previously, do to an action such as drag and drop, one would have to use element(by.foo).find(). Now, just passing element(by.foo) works. For example:

    browser.actions().doubleClick(element(by.id('mybutton'))).perform();
  • (b2a4ffc) fix(configParser): always return "this" from addFileConfig

0.20.1

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

Bug Fixes

0.20.0

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

Features

  • (220d793), (6603a7e) chore(webdriver): update selenium version to 2.40.0 and download location

  • (ad5f3aa) feat(jasminewd): allow custom matchers to return promises

    Allow custom jasmine matchers to return a promise which resolves to a boolean and match against the resolution of the promise

  • (41feaca) feat(framework.cucumber): Allow multiple tags on cucumber tests.

    Motivation: Support for multiple tags on the cucumber test execution, to be able to filter with more complex expressions the scenarios to run.

    How to use:

    cucumberOpts: {
       tags: '@dev'
    }
    

    or

    cucumberOpts: {
       tags: ['@dev', '~@ignore']
    }
    

    More information on tags: https://github.com/cucumber/cucumber/wiki/Tags

Bug Fixes

  • (2ca6541) fix(debug): make protractor debug work in the new runner/launcher world

    Closes #552

  • (a68627b) fix(launcher): command line args should be passed as-is to the runner

    This allows users to continue to use optimist (or other process.argv) processing within their tests and grab values from the command line.

    Closes #571.

  • (767c306), (02defe3) fix(jasminewd): include full pre-async-call stack trace in expectation failure message

  • (b6df2cf) fix(configParser): load coffee and typescript for child processes

    Without loading coffee in configParser.js, child processes which try and load a coffeescript config file do not have coffee registered with node's required, and child tests fail.

    Fixes an issue with using coffeescript config files.

  • (64bee25) fix(locators): add locator with multiple arguments

    When using a custom locator with multiple arguments, only the first argument was used when calling webdriver.findElements.

  • (87b0c7f) fix(debug): display error message when runner fails

0.19.0

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

Features

  • (77393d0), (6848180), (cca82ca) feat(runner/launcher): major runner updates to allow multiple capabilities

    Adding simultaneous runner capability (grid-style), refactoring launch/runner init system, and abstracting out configParser module.

  • (642de06) feat(protractor): add removeMockModule method

  • (88c339f) feat(runner): add adapter for cucumber.js

    Conflicts: lib/runner.js

Bug Fixes

  • (8924bbc) fix(cli): convert capabilities arguments to dot-notation for WebDriver compatibility

  • (a96d32f) fix(webdriver-manager): upcase in IE download url

    The url for the Win32 version of the IEDriverServer is apparently case sensitive: win32 vs Win32

Breaking Changes

  • (05eb42b) refactor(locators): moves scope in locators to last argument

    scope defaults to document, and is an optional argument so now be moved to the end. Came up from debugging and trying to use window.clientSideScripts.findInputs('username'); which failed. Refactored to match original intent.

    BREAKING CHANGE: anything relying on clientsidescripts should no longer pass element scope as first argument.

    Before:
    
    window.clientSideScripts.findInputs(document, 'username');
    
    After:
    
    window.clientSideScripts.findInputs('username', document);
    // or simply
    window.clientSideScripts.findInputs('username');
    

    Also, any custom locators using addLocator will now break since the arguments order has chnaged. To migrate the code follow the example below:

    Before:
    
    var findMenuItem = function() {
      var domScope = arguments[0];
      var myArg = arguments[1];
      // balh blah blah
    };
    by.addLocator('menuItem', findMenuItem);
    
    After:
    
    var findMenuItem = function() {
      var myArg = arguments[0];
      var domScope = arguments[1];
      // balh blah blah
    };
    by.addLocator('menuItem', findMenuItem);
    

    Closes #497

0.18.1

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

Bug Fixes

  • (a79aa73) fix(cli): specs was being processed as a string, not a list

    Fixes #495

0.18.0

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

Features

  • (e3b1e7c) feat(config): add option to exclude specs based on file patterns

    The config now accepts exclude, an array of patterns to exclude.

  • (88a1e58) Feat(clientSideScripts): Add by.buttonText, by.partialButtonText

    Adds client side JS implementations of by.buttonText and by.partialButtonText, enabling element lookup based on innerText.

    Closes #452

  • (8d29c93) feat(config): allow LiveScript configuration files

Bug Fixes

  • (d06d931) fix(timeouts): fix an obscure cause of firefox timeouts

    Fixes #493

  • (de39e50) fix(jasminewd): support multi-argument matchers

    Implement support for multi-argument matchers in promise wrapper.

    Closes #477

  • (11c4210) fix(testForAngular): add a message when page load does not complete in time

  • (6ae6261) refactor(waitForAngular): improve error messages when timeouts occur

  • (5dd93c2) fix(config): allow CoffeeScript 1.7 to be used

    CoffeeScript now requires a register call to be made.

  • (10aec0f) fix(pageload): increase wait timeout

    The 300 ms wait caused problems when testing IE on Sauce Labs. It seems way too short. "browser.get()" invariably timed out. Increasing it solved our problem.

0.17.0

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

Features

  • (cc4f7b5), (8348803) feat(element): allow chaining of element finders with element().element()...

    Chaining calls to element will now build a scoped element finder. No webdriver functions will be called until a method (such as getText) is called on the final element. Example:

    var elem = element(by.id('outer')).element(by.css('inner'));
    

    browser.get('myPage'); elem.click();

    Closes #340.

  • (088a581) feat(runner): add a callback for when the tests are done

    Add an onCleanUp callback to be able to hook into when all the tests have been run.

    Conflicts: referenceConf.js

  • (66c4774) feat(runner): add mocha options to config file

    change lib/runner to allow setting mocha options from config.

  • (092fe1f), (3151ca7) feat(locators): Add map() function to element.all

    Added a map function to element.all to apply a function to each element and return the result of the transformation.

    Resolve promises if there is an object that contains multiple promises. Added index as a second argument to the map function callback.

    Closes #392

  • (7259614), (0257b5f) feat(config): allow CoffeeScript configuration files

    Require CoffeeScript in the cli file to enable CS configuration and spec files.

    Possibly fixes #38

  • (e7d9e08) feat(global): export By (== by) on the global for use with coffeescript (or others who prefer it)

Bug Fixes

  • (a0bd84b) fix(pageload): add a wait during protractor.get() to solve unload issues

    Some systems would not wait for the browser unload event to finish before beginning the asynchronous script execution.

    Closes #406. Closes #85.

  • (4b053eb) fix(runner): only run selenium with spec files

    Only setup Selenium if there are actual spec files passed in

  • (8e096b9) fix(Protractor.prototype.get): resolve baseUrl before ignoring synchronization

    Fixes issues where setting ignoreSynchronization = true ignores the value of baseUrl entirely.

0.16.1

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

Note: 0.16.0 was released as a canary - no changelog for it.

Features

  • (a75fa04) docs(readme): add the travis status widget

  • (478c00a) feat(runner): add beta support for using mocha as your test framework

    This change adds limited support for using mocha as the test framework instead of jasmine. Make the switch by using --framework=mocha on the command line or adding framework: 'mocha' to the config. Tests will be run using the BDD interface. The interface is adapted so that tests run asynchronously without needing to call done().

    Note that there is currently no support for an assertion framework, so you will need to require whichever assertion framework you prefer. This means there is no adapter to make the assertions unwrap promises, so you will need to resolve promises yourself and run the assertions afterwards.

  • (3731abf) feat(webdriver-manager): add seleniumPort command line option

    Added seleniumPort command line option so that the standalone selenium server can be started with the supplied port number as opposed to the default port 4444.

    $ webdriver-manager start --seleniumPort 4443
    

Bug Fixes

  • (bc18c42) chore(config): saucelabs requires tunnel identifier to be a string

Breaking Changes

  • (478c00a) feat(runner): add beta support for using mocha as your test framework

To allow the user to customize their framework, the protractor runner will now wait until just before onPrepare to load the framework. This means that jasmine will not be available in global until onPrepare. For example, this means that requiring the jasmine-reporters module must be done inside onPrepare, since that module expects jasmine to be available at the time it is loaded.

0.15.0

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

Features

  • (f8d0291) chore(version): update the version of dependency minijasminenode

    This is notable because in the newer 0.2.6 version of minijasminenode, ddescribe and iit are supported. These should be available after running an 'npm update'.

  • (6165023) feat(runner): return a promise from runner.runOnce

    In some cases knowing when the runner has finished is a requirement (e.g. an async grunt task).

  • (d44ef01) feat(debugging): remove webdriver lines from stacktraces by default to improve readability

  • (33fa4a4) feat(locators): by model works for anything with a model, not just input

    Notably, by.model will now find selects and textareas.

    Closes #321.

  • (238bb74) feat(ignoresync): ignoreSynchronization now affects the behavior of browser.get

    Now, when ignoring synchronization, calls to browser.get are equivalent to calling browser.driver.get.

    Closes #306

  • (30c0ceb) feat(element) element.all exports an 'each' method

    Usage:

    element.all(by.model('foo')).each(function(webElement) {
      // Do stuff with webElement.
    });
    

    Closes #298

  • (6a73a25) feat(by.repeat) by.repeat support for multi ng-repeat

    Make by.repeat (and its column and row friends) work with ng-repeat-start and ng-repeat-end elements.

    Closes #366. Closes #182.

Bug Fixes

  • (50d6fde) fix(clientSideScripts): bind-template directive shouldn't break bind locators

    Fix "UnknownError: angular.element(...).data(...).$binding[0] is undefined" error raised when trying to use "by.binding" locator in any element of a page that contains at least one "bind-template" directive.

  • (f8c606b) fix(webdriver-manager): make sure selenium standalone shuts down nicely

    This addresses selenium server shutdown in two ways

    • the node process will stay open until selenium has exited
    • if the user inputs to STDIN (e.g. press space) selenium will shut down gracefully
  • (e98f71e) fix(webdriver-manager): fix IEDriver install and running via windows

    Changed the binaries.ie.url function to return the correct URL for the IEDriverServer. Created the zip object in the win32 section to be able to decompress IEDriverServer. Added a function to normalize a command across OS and spawn it. It allows start the webdriver in win32.

    Seen here: https://github.com/yeoman/generator/blob/master/lib/actions/spawn_command.js

0.14.0

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

Features

  • (c579a1a), (f54fd5d) feat(webdriver-manager): redo the script to run and install selenium/webdriver

    Breaking Change. As outlined in Issue #296, redoing the way the selenium/webdriver install and run helper scripts work. Now, the 'webdriver-manager' script will be available either locally or globally (depending on how protractor was installed). It replaced install_selenium_standalone and the 'start' script that was provided after install. Run webdriver-manager update to download new versions of selected webdriver binaries. Run webdriver-manager start to start the standalone server. In addition, this fixes issues with running the server starter in Windows, and allows automated downloading of the IEDriver.

    Thanks to kurthong and vipper for their PRs with windows fixes, which were very useful in preparing this.

  • (a69ebc3) feat(runner): use selenium and chromedriver from the default location if nothing else is specified

Bug Fixes

  • (1fa090c) fix(runner): merge should override entire arrays, not just parts of them

    Closes #304

  • (a2afb4d) fix(element): element.all.get and element.all.first/last should wrap web elements

    Closes #307

  • (f3be172) fix(runner): running with chromeOnly should try to find chromedriver with .exe extension

    Closes #283

Breaking Changes

  • (c579a1a) feat(webdriver-manager): redo the script to run and install selenium/webdriver

    Breaking Change. Your old selenium/start script will continue to work, but install_selenium_standalone no longer exists. To do a clean update, remove the selenium folder. Then run webdriver-manager update

  • (a1c91a2) fix(config): Make all file paths in config files relative to the config file itself

    Breaking Change Previously, onPrepare and specs were relative to the location of the config, but seleniumServerJar and chromeDriver were relative to the cwd when the test was called. If you were calling the tests from somewhere other than the same directory as the config location, you will need to change the paths of seleniumServerJar and/or chromeDriver. Closes #222.

0.13.0

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

Features

  • (ce5f494) feat(element): element.all now has 'first' and 'last' methods

  • (ef61662) feat(runner): allow bypassing the selenium standalone server if running only chrome

    Using the config option chromeOnly now enables running ChromeDriver directly, without going through the Selenium Standalone. The chromedriver binary should be available in your PATH, or should be specified with the config option chromeDriver.

  • (76c094a) feat(getLocationAbsUrl) - allows current url to be obtained on IE (and Chrome/Firefox)

  • (6a1c918) feat(runner): add error message for bad jar path

  • (98bce7e) feat(locators): add the ability to add custom element locators with by.addLocator

    Custom locators can now be added using by.addLocator(name, script), where script is a self-contained snippet to be executed on the browser which returns an array of elements. Closes #236.

  • (c7bcc20) chore(angular): update to angular 1.2

Bug Fixes

  • (a24eeee) fix(runner): do not error out if only one spec pattern does not match any files

    Previously, the runner would throw an error if any one of the spec patterns did not match any files. Now it logs a warning in that case, and errors out only if there are no found files in any spec patterns. Closes #260

  • (f3b3fdb) fix(element): fix an error where all.then() wasn't calling callbacks.

    Closes #267

  • (137d804) fix(jasminewd): patched matcher should understand 'not'

    Closes #139.

0.12.1

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

Minor features

  • (201b59c) feat(jasminewd): better error messaging when expect is called with a WebElement

  • (d383770) feat(clientsidescripts): better error reporting from testForAngular and waitForAngular

Bug fixes

  • (8580c0c) fix(install-selenium): update to chromedriver 2.6

    Update to the latest version of Chromedriver. This fixes the issue with OS X 10.9. Closes #181.

  • (ebc528f) fix(debugging): switch debugging tests to the new test app urls.

  • (8ff4787) fix(runner): exit with proper code when tests fail

    When errors with messages matching /timeout/ were created, Protractor clears the control flow so that the remainder of the tasks scheduled for that spec don't bleed over into the next spec. This was messing up the promises used in the runner, since they are also webdriver promises. Long term, the runner should not use webdriver promises. For now, fix by having the runner resolve promises directly rather than through chaining, and add a TODO to use promises which aren't connected to WebDriver's control flow in the runner.

    Closes #214.

  • (81501c5) fix(clientsidescripts): workaround for IE 8 "async page reload" init problem

  • (21264fd) fix(find): fix error when exposed to ng-options element with a default option

    Protractor will now ignore elements with the ng-bind class that don't have a proper binding on their data, instead of blowing up when encoutering them.

    Closes #165, may fix #170

    • (f672648) fix(findelements): fix isPresent for repeaters by row for real

Breaking Changes

  • (bf5b076) fix(cli): remove boolean verbose and stack trace options

    Also add better description for what the command line options are.

    Tiny breaking change: Rename the 'includeStackTrace' command line option to 'stackTrace' for brevity.

0.12.0

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

This change introduces major syntax updates. Using the new syntax is recommeded, but the old version is still supported for now. Note also that the test application, docs, and example tests have been updated.

Features

  • (a2cd6c8) feat(syntax): big syntax reboot, expose global $, $$, element, and by

In an effort to make tests more readable and clear, a few more global variables will now be exported.

browser is an instance of protractor. This was previously accessed using protractor.getInstance.

by is a collection of element locators. Previously, this was protractor.By.

$ is a shortcut for getting elements by css. $('.foo') === element(by.css('.foo'))

All changes should be backwards incompatible, as tested with the new 'backwardscompat' tests.

Bug fixes

  • (8c87ae6) fix(onPrepare): onPrepare with a string argument should resolve from the config directory

onPrepare can take a string, which is a filename containing a script to load adn execute before any tests run. This fixes the string to resolve the filename relative to the config file, instead of relative to the current working directory where protractor is called.

0.11.0

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

Features

  • (02cb819) feat(cli): allow passing params directly to your test

Adds a config object 'params' which is passed directly to instances of protractor. 'params' may contain nested objects, and can be changed via the command line as:

--params.login.user 'Joe' --params.login.password 'abc'

This change also switches to using optimist to parse command line flags for more flexibility and better usage documentation. Closes #32.

  • (c025ddb) feat(findElements): $ & $$ shortcuts.

Introducing the $ shortcut method for finding a single element by css without having to call protractor.By.css. Additionally $$ for finding all elements by css.

Examples:

  • ptor.$('.some .selector')

  • ptor.$$('.some .selector')

  • (7d74184) feat(explorer): add an interactive element explorer

When debugging or first writing test suites, you may find it helpful to try out Protractor commands without starting up the entire test suite. You can do this with the element explorer. This change introduces a first version of the element explorer. Closes #107

Bug Fixes

  • (e45ceaa) fix(repeaters): allow finding all rows of a repeater

Now, finding an element with the strategy 'protractor.By.repeater()' returns a promise which will resolve to an array of WebElements, where each WebElement is a row in the repeater. Closes #149.

  • (b501ceb) fix(findElements): Consistently include evaluate.

When using findElements with a css locator, wrap the returned list of elements with protractor specific functionality.

  • (c17ac12) fix(cli): allow running from command line without a config file

If all necessary fields are specified (e.g. seleniumAddress and at least one spec), a config file shouldn't be necessary.

Breaking Changes

  • (421d623) fix(repeat): use 0-based indexing for repeater rows

BREAKING CHANGE: Finding rows with protractor.By.repeater now indexes from 0 instead of 1. This should be more familiar to most modern programmers. You will need to edit existing tests. Closes #90.

Before:

// The fourth foo
ptor.findElement(protractor.By.repeater('foo in foos').row(4));

After:

// The fourth foo
ptor.findElement(protractor.By.repeater('foo in foos').row(3));

0.10.0

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

Features

  • (881759e) feat(timeouts): add a unique error message when waitForAngular times out

To improve the readability of error messages, when waitForAngular times out it now produces a custom message. This should help clarify confusion for pages that continually poll using $interval. This change also adds more documentation on timeouts. See issue #109.

  • (37e0f1a) feat(install selenium): better communication in the install script

Adds better messages in the selenium server install script, and also makes the script output a 'start' executable which can be used to quickly start up the selenium standalone. not yet windows friendly. Closes #108.

  • (b32f5a5) feat(config): add exmples for dealing with log-in

Adds examples for how to log in when the login page is not written in Angular. New examples are in spec/login.

  • (1b7675a) feat(cli): add an onPrepare callback to the config

This onPrepare callback is useful when you want to do something with protractor before running the specs. For example, you might want to monkey-patch protractor with custom functions used by all the specs, or add the protractor instance to the globals. An example usage is shown in the spec/onPrepareConf.js file and its associated spec.

Bug fixes

  • (256b21c) fix(cli): allow passing the config file before the options

The cli usage says:

USAGE: protractor configFile [options] However, the options passed as argument are merged into the default configuration as soon as the configFile is met in the args parsing loop. This fix merges the options in the default configuration only after the loop, allowing to pass the options to the cli before or after, or around the config file.

  • (6223825) fix(jasminewd): allow use of custom matchers

Using jasmine.Matchers.prototype to generate the chained methods for expect() calls is flawed because it does not pick up custom matchers defined using addMatcher. Instead, use either the matchersClass for the current spec or from the environment.

  • (c22fc38) fix(sync): getCurrentUrl and friends should sync with Angular first

getCurrentUrl, getPageSource, and getTitle should sync with Angular before executing. Closes #92.

  • (dd06756) fix(clientsidescripts): findElements and isElementPresent for protractor.By.select

  • (c607459) fix (navigation): The defer label should appear before other window names, not after.

  • (806f381) Fix: findElements() and isElementPresent() now work for protractor.By.input. Closes #79.

Breaking changes

  • (881759e) feat(timeouts): add a unique error message when waitForAngular times out

This changes the default script timeout from 100 seconds down to 11. Tests which relied on extremely long timeouts will need to change the default script timeout with driver.manage().timeouts().setScriptTimeout(<bigNumber>).

0.9.0

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

Features

  • (0e8de99) Wrap WebElements with Protractor specific features. This change allows chained findElement calls to work with Protractor locators. It also adds a function, evaluate, to evaluate an angular expression in the context of a WebElement's scope.

  • (9f53118) Improving the command line interface (adding more options). This allows the --spec option to be passed with test files that will be resolved relative to the current directory. Smarter merging of default config values. Closes #65.

  • (73821fb) Adding an 'ignoreSynchronization' property to turn off Protractor's attempt to wait for Angular to be ready on a page. This can be used to test pages that poll with $timeout or $http.

Bug fixes

  • (cfc6438) Adding support for isElementPresent with Protractor locators. Closes #11.

  • (8329b01) Adding waitForAngular calls before WebElement functions. Closes #37.

0.8.0

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

Docs

  • Added documentation to the docs folder.

  • (08ef244) Adding debugging tests showing different types of timeouts, and fixing a bug where scheduled tasks from a previous it block would run into the next in case of a timeout.

Features

  • (1c7eae0) Updating the binary script to understand debug, so that protractor debug conf.js works.

  • (7a59479) Adding a 'debug' function to protractor. This schedules a debugger pause within the webdriver control flow.

  • (679c82d) Mixing in all webdriver exports to protractor. This means that webdriver classes such as ActionSequence and Keys are accessible on the global protractor.

  • (3c76246) Added nested angular app (ng-app on an element other than <html> or <body>) capability via conf file.

Bug fixes

  • (1c9b98d) Fixed Sauce issues: low timeouts, shutdown and init order.

Breaking Changes

  • Now running selenium 2.25. Requires updating WebDriverJS and the selenium standalone binary and chromedriver binary.

  • (a54abfb) Spec paths in configuration files are now resolved from the location of the spec file instead of the current working directory when the command line is run.

0.7.0

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

Features

  • (7966912) Updating to Selenium 2.24.

  • (90f0a94) Instead of having tests run with the protractor runner need to require() the protractor library, publish it to the global namespace. This insures the instance of protractor used within the tests is the same as the one used on the command line. Closes #36. Version bump for incompatible API changes.

  • (cb373c9) Adding glob matching to the spec files from the config. Closes #29.

Breaking changes

  • Now running on selenium 2.24. Requires updating WebDriverJS and the selenium standalone binary.

  • The protractor runner now publishes protractor to the global namespace and sets up the Jasmine-WebDriver adapter. Tests run with this should no longer include

// var protractor = require('protractor'); // No longer needed!
// require('protractor/jasminewd'); // No longer needed!

var ptor = protractor.getInstance(); // This should just work now.