Having some trouble retrieving all elements using CSS or a repeater.
this.clickRandomEmployee = function(){
employees = elementController.getAllElements('css','#employee-list li');
numberOfEmployees = employees.length;
console.log(numberOfEmployees);
var numRand = this.getRandomNumber(numberOfEmployees);
console.log(numRand);
elementController.doubleClick(employees.get(numRand));
}
this.getAllElements = function(locatorType,value){
var emps;
console.log(locatorType);
console.log(value);
if(locatorType=='css'){
emps = element.all(by.css(value));
}
else if(locatorType=='repeater'){
emps = element.all(by.repeater(value));
}
return emps;
};
The code above is being called from a test script in an attempt to find all elements, however it returns undefined. Any suggestions on how to resolve this issue?