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

Commit 82c1d47

Browse files
rleitehankduan
authored andcommitted
feat(protractor): add iteration index to ElementArrayFinder.each
1 parent d780f44 commit 82c1d47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/protractor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ var buildElementHelper = function(ptor) {
277277
*/
278278
ElementArrayFinder.prototype.each = function(fn) {
279279
return this.asElementFinders_().then(function(arr) {
280-
arr.forEach(function(elementFinder) {
281-
fn(elementFinder);
280+
arr.forEach(function(elementFinder, index) {
281+
fn(elementFinder, index);
282282
});
283283
});
284284
};

0 commit comments

Comments
 (0)