Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
feat(protractor): add iteration index to ElementArrayFinder.each
Browse files Browse the repository at this point in the history
  • Loading branch information
rleite authored and hankduan committed Jun 25, 2014
1 parent d780f44 commit 82c1d47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ var buildElementHelper = function(ptor) {
*/
ElementArrayFinder.prototype.each = function(fn) {
return this.asElementFinders_().then(function(arr) {
arr.forEach(function(elementFinder) {
fn(elementFinder);
arr.forEach(function(elementFinder, index) {
fn(elementFinder, index);
});
});
};
Expand Down

0 comments on commit 82c1d47

Please sign in to comment.