sincecutoff.com
← all changes

Playwright actions accept a scroll option

Introduced 2026-07-24 · score 0.99

HOW TO USE IT

When an action must not scroll its target into view automatically, pass `scroll: "none"`; the action fails if the element is outside the viewport. Use `scroll: "auto"` to allow automatic scrolling.

await page.getByRole('button', { name: '<button name>' }).click({ scroll: 'none' });

WHY THIS HELPS

Run an action without Playwright automatically scrolling its target into view.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.62.0
  • scroll: Action option: `"none"` disables scrolling and the action fails if the element is not in the viewport; `"auto"` (the default) scrolls into view when needed, including nested scrollable containers.
  • Prerequisite: Added in Playwright v1.62.
  • The `scroll` option accepts `"auto"` or `"none"`.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card