Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use await page.mouse.wheel({deltaY: 100}) to send vertical wheel input in Puppeteer; use deltaX for horizontal input. If the page has nested scroll areas or handles input based on the hovered element, move the mouse over the intended area first. For a known element and requested offsets, Puppeteer also provides locator.scroll().

Send a wheel event with Puppeteer

page.mouse.wheel(options) returns a promise and dispatches a synthetic mousewheel event. Its options include numeric deltaX and deltaY values for horizontal and vertical input. The coordinates used by Puppeteer’s Mouse API are main-frame CSS pixels relative to the viewport’s top-left corner.

This runnable ES module example opens a page, sends vertical and horizontal wheel input, and closes the browser:

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.goto('https://example.com');

  await page.mouse.wheel({deltaY: 500}); // vertical wheel input
  await page.mouse.wheel({deltaX: 200}); // horizontal wheel input
} finally {
  await browser.close();
}

Install Puppeteer in your project before running the example. Adjust the URL and deltas for the page and interaction you are testing. A delta is input to the wheel event, not a guaranteed number of pixels that the page will scroll.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)

Target a specific scroll area

When a page contains nested scroll containers, the pointer’s position can determine which one receives the wheel input. Wait for the target, get its bounding box, and move the pointer to its center before calling wheel():

const target = await page.locator('.scrollable-panel').waitHandle();
const box = await target.boundingBox();

if (!box) {
  throw new Error('Target is not visible in a bounding box');
}

await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
await page.mouse.wheel({deltaY: 400});

The bounding-box check prevents attempting to move to coordinates when Puppeteer cannot provide a box for the target. If the element is outside the viewport or otherwise not measurable, first determine why it is not available for interaction.

Rank #2
Sale
Logitech G305 Lightspeed Wireless Gaming Mouse - Black
  • The next-generation optical HERO sensor delivers incredible performance and up to 10x the power efficiency over previous generations, with 400 IPS precision and up to 12,000 DPI sensitivity
  • Ultra-fast LIGHTSPEED wireless technology gives you a lag-free gaming experience, delivering incredible responsiveness and reliability with 1 ms report rate for competition-level performance
  • G305 wireless mouse boasts an incredible 250 hours of continuous gameplay on just 1 AA battery; switch to Endurance mode via Logitech G HUB software and extend battery life up to 9 months
  • Wireless does not have to mean heavy, G305 lightweight mouse provides high maneuverability coming in at only 3.4 oz thanks to efficient lightweight mechanical design and ultra-efficient battery usage
  • The durable, compact design with built-in nano receiver storage makes G305 not just a great portable desktop mouse, but also a great laptop travel companion, use with a gaming laptop and play anywhere

Use locator scrolling when you need element offsets

If the goal is to scroll a known element by requested horizontal and vertical offsets, rather than to test a particular hover-and-wheel interaction, use Puppeteer’s locator API:

await page.locator('.scrollable-panel').scroll({
  scrollLeft: 0,
  scrollTop: 400,
});

Puppeteer documents that locator scrolling uses mouse wheel events. It waits for the element to be in the viewport, visible, and stable across two animation frames. Those preconditions make it a convenient higher-level option, but the documentation does not promise identical behavior on every site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Logitech M185 Compact Ambidextrous Wireless Mouse with Rubber Grips - Blue
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)
Approach Use it when What it controls
page.mouse.wheel() You need to exercise wheel-event behavior or the hovered target matters. Sends wheel input with optional deltaX and deltaY; position the pointer over the relevant area when needed.
locator.scroll() You want to scroll a selected element by offsets and its locator waiting behavior is useful. Accepts scrollLeft and scrollTop, with documented visibility and stability preconditions.

Understand what the wheel delta does—and does not—specify

deltaY and deltaX describe the wheel input sent to the page. They do not define a universal mapping to the final scrollTop or scrollLeft. Page event handlers, nested containers, and browser behavior affect the result. If the test requires a precise assertion, inspect the relevant element’s scroll position after the interaction rather than assuming the delta equals the resulting offset.

Puppeteer’s mouse events are synthetic; its documentation cautions that they do not fully reproduce what a user can do with a physical mouse. Use this API for browser automation and wheel-event tests, but do not treat it as a complete substitute for validating real-device behavior.

Rank #4
Sale
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
  • Computer mouse for easily navigating a computer interface; click, scroll, and more
  • USB-A wired connection; if existing device only supports USB-C, an additional adapter will be required
  • High-definition (1000 dpi) optical tracking ensures responsive cursor control for precise tracking and easy text selection
  • 3 buttons offer effortless fingertip control
  • Plug-and-go ready for instant use

Troubleshoot wheel scrolling

  • The page did not scroll: Check that the pointer is over the intended scroll area, that it can scroll in the chosen direction, and that page event handlers do not prevent the expected default behavior.
  • The wrong container moved: Position the mouse over the intended nested region using its bounding box. If you only need to move a selected element to offsets, try locator.scroll().
  • The movement is not the expected distance: Do not infer a fixed pixel mapping from the delta. Read the element’s resulting scroll position and assert against the behavior your test actually requires.
  • A locator cannot scroll: Check whether the element is in the viewport, visible, and stable across the locator’s required animation frames. If those preconditions do not fit the interaction, use the lower-level mouse API and position the pointer deliberately.
  • You need physical-mouse fidelity: Puppeteer’s events are synthetic and do not fully reproduce physical mouse input. Validate that requirement with an appropriate real-device test rather than relying on this API alone.

Or skip the browser setup

If you need a page screenshot rather than a wheel-event test, ScreenshotNeo can capture a URL with one GET request. It accepts cookie banners before capture and removes known consent platforms, newsletter popups, and chat widgets; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, and its free plan includes 1,000 shots per month without a card.

For example, save a screenshot as WebP with cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo documentation for request options. Paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month—no card required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Version note

Puppeteer’s documentation pages for Mouse.wheel(), the Mouse class, and the page-interactions guide identify version 25.12.0; the separately documented MouseWheelOptions page identifies version 25.3.0. For version-sensitive behavior, check the typings for the Puppeteer package installed in your project.

Best Value
Sale
Acer Wireless Mouse for Laptop, 2.4GHz Computer Mouse 3 Adjustable 1600 DPI
  • 【Plug and Play for Home/Office/School】The wireless computer mouse features 2.4GHz connectivity, delivering a stable, interference-free connection up to 32ft. Designed for 𝐦𝐞𝐝𝐢𝐮𝐦 𝐭𝐨 𝐥𝐚𝐫𝐠𝐞 𝐬𝐢𝐳𝐞𝐝 𝐡𝐚𝐧𝐝𝐬, it ensures comfortable use all day. Simply plug in the USB-A receiver for instant pairing—no drivers needed. 📌📌 If the mouse isn’t suitable, place the USB receiver in the battery compartment and return both.
  • 【3 Levels Adjustable DPI】This travel USB mouse offers 3 adjustable DPI settings (800, 1200, 1600), allowing you to customize sensitivity for precise design work. Effortlessly switch to match your task and elevate your productivity. 📌 Please remove the film at the bottom of the mouse before use.
  • 【Effortless Browsing】Equipped with forward and backward buttons, this computer mice streamlines your workflow, making it easy to navigate through web pages and files with a simple click. 📌Side button does not work on Mac.
  • 【Visible Indicator Light】 The pc mouse features a visual indicator for DPI levels and low battery alerts. The red light flashes once for 800 DPI, twice for 1200 DPI, and three times for 1600 DPI. When the battery level is below 10%, the light flashes red until the mouse is completely out of power.
  • 【Click to Wake】With smart sleep mode, it saves power by standby after 10 inactive minutes, just 2-3 clicks to wake. This efficient design delivers 3x longer battery life than motion-wake mice. Engineered for durability, its buttons and scroll wheel are tested for 10 million clicks, ensuring long-term reliability and consistent performance.

Frequently Asked Questions

Does page.mouse.wheel() need an element selector?

No. It sends wheel input through the page’s mouse object. Use a selector and position the pointer when you need a particular hovered target to receive the input.

Can I use Puppeteer wheel events to test real hardware scrolling?

Not fully. Puppeteer generates synthetic mouse events, which do not reproduce every capability of a physical mouse.

Quick Recap

SaleBestseller No. 1
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Product carbon footprint: 3.97 kg CO2e; Contoured shape: Gives you more comfort and control
$12.99
SaleBestseller No. 3
SaleBestseller No. 4
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Computer mouse for easily navigating a computer interface; click, scroll, and more; 3 buttons offer effortless fingertip control
$6.79

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.