How to emulate Page up / Page down key in Puppeteer

To emulate a keypress to the Page up key in Puppeteer, use

example.js
await page.keyboard.press("PageUp");

To emulate a keypress to the Page down key in Puppeteer, use

example.js
await page.keyboard.press("PageDown");

 


Check out similar posts by category: Javascript, NodeJS, Puppeteer