Skip to content
masterclass Buddy

Playwright · Method

locator.scrollIntoViewIfNeeded

Scrolls a locator into view when it is not completely visible. It first waits for actionability checks and returns no value.

Last updated

Since
v1.14

Syntax

await locator.scrollIntoViewIfNeeded();
await locator.scrollIntoViewIfNeeded(options);

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Locator.screenshot
  • Locator.click
  • Locator.waitFor

Source: Locator | Playwright. Checked 2026-11-03.