I am attempting to iterate through a series of asynchronous functions and calculate the total sum of all elements, while also being able to access the final sum
.
it("Practice with Select.all", function(){
element.all(by.css('.items li')).then(function(items) {
var len = items.length;
var sum = "";
for(var counter = 0; counter<len;counter++){
items[counter].getText().then(function(item){
sum += item;
console.log(sum);
});
}
});
});