Back to Puppeteer

Locator.scroll() method

website/versioned_docs/version-24.40.0/api/puppeteer.locator.scroll.md

19.2.2660 B
Original Source

Locator.scroll() method

Scrolls the located element.

Signature

typescript
class Locator {
  scroll<ElementType extends Element>(
    this: Locator<ElementType>,
    options?: Readonly<LocatorScrollOptions>,
  ): Promise<void>;
}

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

this

</td><td>

Locator<ElementType>

</td><td> </td></tr> <tr><td>

options

</td><td>

Readonly<LocatorScrollOptions>

</td><td>

(Optional)

</td></tr> </tbody></table>

Returns:

Promise<void>