In Puppeteer 25.4.0, LocatorScrollOptions has two optional numeric properties: scrollLeft and scrollTop. Pass the options to locator.scroll() for an explicit scroll. This differs from locator actions’ automatic viewport preparation, which is enabled by default. The reference does not specify units or whether the numbers are positions or increments, so do not assume what a particular value will do.
What options does LocatorScrollOptions have?
The Puppeteer 25.4.0 interface reference lists two optional number properties:
scrollLeftscrollTop
The interface is documented as extending ActionOptions. Its reference does not state defaults, units, coordinate frame, or whether values represent absolute positions or deltas. See the LocatorScrollOptions API reference for that version.
How do you explicitly scroll a locator?
Create a locator with page.locator(selector), then call its scroll() method with an optional options object. The method returns Promise<void>.
Recommended Free Tools
#1 Best Overall
await page.locator('.target').scroll({ scrollTop: 100 });
Here, 100 is only an illustrative numeric argument. The API reference does not establish the resulting position or distance. Consult the Locator.scroll() reference for the method signature and confirm the documentation matches your installed Puppeteer version.
Does a locator scroll into view automatically?
Locator viewport preparation is separate from calling scroll(). The locator’s setEnsureElementIsInTheViewport(value) method returns a cloned locator configured to scroll the element into the viewport if it is not already there. Its documented default is true, so ordinary locator actions generally prepare an offscreen element without requiring you to issue an explicit scroll call. See setEnsureElementIsInTheViewport().
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
const target = page.locator('.target');
await target.click();
Use locator.scroll() when your code specifically needs the explicit scroll operation; do not assume it is required merely to make an offscreen target available for a locator action.
How is this different from ElementHandle.scrollIntoView()?
ElementHandle.scrollIntoView() is a separate API for scrolling an element into view. Its documented implementation uses either the automation protocol client or a call to element.scrollIntoView(). That into-view behavior is not the same documented contract as the two numeric options on Locator.scroll(). See the ElementHandle.scrollIntoView() reference.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
What selectors can create a locator?
page.locator(selector) creates a locator. CSS selectors can be used directly; Puppeteer-specific selector syntax also supports text, accessibility role and name, XPath, and combinations that cross shadow roots. See Page.locator().
Version and behavior limits
The options interface reference is for Puppeteer 25.4.0, while the cited locator and element-handle references show 25.12.0. Check your installed package version and use the corresponding documentation. These references do not establish scroll units, absolute-versus-relative semantics, or detailed behavior with nested scroll containers; avoid relying on those details without checking the matching version’s documentation or implementation.
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Troubleshooting
- An explicit scroll does not produce the expected final position: the options reference does not define units or whether a value is a position or increment. Do not infer the result from the numeric value alone.
- A locator action moves the page unexpectedly: locator viewport preparation is enabled by default. Review whether the action is targeting an offscreen element and whether that behavior suits the task.
- The method or options do not match your installed package: check the installed Puppeteer version and consult that version’s API reference; the cited interface and related method pages are from different versions.
- A nested scrolling container behaves differently than expected: the cited references do not specify detailed nested-container outcomes. Verify behavior against the relevant version rather than treating the options as a documented container-specific control.
Or skip the browser setup
If your goal is a website screenshot rather than automating a Puppeteer scroll, ScreenshotNeo can return an image or PDF with one GET request. Its API also accepts the parameter names used by other screenshot APIs.
Quick Recap
Best Value
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for options and response details. Cookie banners, newsletter popups, and chat widgets are removed before capture; those cleanup steps can each be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response reports the page verdict and billing status in headers. An MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
Sign up for ScreenshotNeo’s free plan.
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.




