Protractor v0.11.0 Release Notes
-
🚀 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));