This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Description
Some of my tests have to collect the values of multiple elements inside a parent element.
For example, I want to know the labels inside a menu:
It would be nice to have a map function in element.all:
element.all(by.css('.menu .item')).map(function(item) {
return item.getText();
}).then(function(labels) {
expect(labels).toEqual(['one', 'two', 'three']);
});
Map would iterate through each element found with the locator. Then map would resolve all the promises and return a promise with an array of values.