I am trying to achieve the following:
it('should retrieve the number of API Keys from a list'), () => {
let numApiKeys = 0;
element.all(by.id('ApiKeyList')).count().then(function(count) {
numApiKeys = count; // assuming count = 5
});
console.log(numApiKeys); // however, it displays numApiKeys = 0
});
I am struggling to obtain the length of 'ApiKeyList'; numApiKeys
consistently returns 0
.
Is there a way for me to accurately determine the length of the list?