How can I get protractor to scroll down on a table? My table does infinite scrolling - it loads 20 records, and when the second-to-last-row is displayed, it fetches the next 20 records. Not all records are in view...some are below yet to be scrolled into, and some are above when the user has scrolled past it. I was thinking the test is
it('should fetch next set of records on scroll') {
element.all(by.id('users')).map(function (elm) {
return elm;
}).then(function (users) {
expect(users.length).toBe(20);
});
// Scroll the table to the bottom to trigger fetching more records
element.all(by.id('users')).map(function (elm) {
return elm;
}).then(function (users) {
expect(users.length).toBe(40);
});
};
Is this the right way of doing this?
Aucun commentaire:
Enregistrer un commentaire