I have some list that gets filled with rows by ajax call, above it I have an itemCount span - to show how many rows we have. After the table is filled by rows, the itemCount span value is updated. what I try to do is to copy this itemCount value, to add a new item to the list and then to test that the new itemCount value is bigger by 1 than the old one. The problem, I think, is that when I take the first value from the itemCount span, it is still empty. I tried to add browser.waitForAngular();, etc, but the value is still empty:
element(by.id('itemsCount')).getText().then(function(text) {
console.log('**********' + text);
});
what I see is just: '**********'
Thanks for any help !
you could try using the expected conditions like this.
Basically wait till the itemsCount isn't blank anymore then get it's text.
There is some different between getText() and getAttribute(), depending on what sort of field it is. Can you try getAttribute and see if it grabs the text?