We're trying to scroll down a page in order to trigger lazy-loading of content. This does not seem to work. While debugging, I found that scrolling on an arbitrary web page is also not possible:
cy.scrollTo("bottom") throws an error:
CypressError: Timed out retrying: cy.scrollTo() failed because this element is not scrollable:
The selected element is scrolled
Tried this on 3.4.1 and using https://wikipedia.org as baseUrl in cypress.json
it('scroll', () => {
cy.visit('https://www.wikipedia.org');
cy.get('body').scrollTo('bottom', {
duration: 10000,
easing: 'swing',
});
});

Mac OS 10.14.6 (18G87)
Cypress 3.4.1
Electron
The code below works. Why do you need to scroll the body? The body of wikipedia is not the actual element that is scrolling when a user scrolls, it scrolls the window, so that's why it's throwing.
it('scrolls', () => {
cy.visit('https://www.wikipedia.org')
cy.scrollTo('bottom', {
duration: 10000,
easing: 'swing',
})
})
This works too
cy.window().scrollTo('bottom')
Most helpful comment
The code below works. Why do you need to scroll the
body? Thebodyof wikipedia is not the actual element that is scrolling when a user scrolls, it scrolls thewindow, so that's why it's throwing.This works too