I've got problem with some of my protractor tests. In short word, i need to check some numer of elements on my page with number from previous filter. When filter is clicked there should be displayed only A alements, B elements number should be 0.
I realized that protactor is waiting for long time when
it('displays only wireless rows', function () {
clientsPage.clientWiredFilterFalse.click();
clientsPage.getWirelessTableRows().count().then(function (numwireless) {
expect(numwireless).toEqual(wirelessCount);// in a second
});
clientsPage.getWiredTableRows().count().then(function (numwired) {
expect(numwired).toEqual(0);// 20-30 seconds
});
});
On this page I've got 0 elements that i get from getWiredTableRows and some from getWirelessTableRows()
This first expect is executing instantly, the second one is waiting for many second until it finally realizes that there is no such a element on the page .
Why protractor is waiting for some elements for appearing ? It only happens for me when there is 0 elements returned