The URL I'm talking about is https://www.vudu.com/content/movies/movieslist. I'm trying to scroll through the part where the movies are. When I use the following code, it doesn't work.
await page.evaluate( () => {
window.scrollBy(0, window.innerHeight);
});
I think this is because you naturally have to hover over the movies before that part can scroll. How can I solve this problem? Thanks!
My full code:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
await page.setViewport({ width: 1280, height: 800 });
url = "https://www.vudu.com/content/movies/movieslist"
await page.goto(url, {waitUntil: 'load'});
await page.evaluate( () => {
window.scrollBy(0, window.innerHeight);
});
await page.waitFor(2000);
})()