What is the best way to get the count of elements on a page? Here is my code snippet:
public countElements(){
element.all(by.repeater('app in userApps')).count().then(function(count) {
console.log(count);
});
return count; // unable to retrieve element count
}
I understand that the count is invisible outside the function, but how can I make it visible? How can I properly return the count variable in the method countElements() ?