Scroll

Provides functionality to control page scrolling in the browser.

Classes

Scroll

Methods

(async) byLines(lines) → {Promise.<void>}

Scrolls the page by the specified number of lines. This method is only supported in Firefox.
Parameters:
NameTypeDescription
linesnumberThe number of lines to scroll.
Throws:
Throws an error if not used in Firefox.
Type
Error
Returns:
A promise that resolves when the scrolling action is completed.
Type: 
Promise.<void>

(async) byPages(pages) → {Promise.<void>}

Scrolls the page by the specified number of pages.
Parameters:
NameTypeDescription
pagesnumberThe number of pages to scroll.
Returns:
A promise that resolves when the scrolling action is completed.
Type: 
Promise.<void>

(async) byPixels(Xpixels, Ypixels) → {Promise.<void>}

Scrolls the page by the specified number of pixels.
Parameters:
NameTypeDescription
XpixelsnumberThe number of pixels to scroll horizontally.
YpixelsnumberThe number of pixels to scroll vertically.
Returns:
A promise that resolves when the scrolling action is completed.
Type: 
Promise.<void>

(async) toBottom(delayTimeopt) → {Promise.<void>}

Scrolls to the bottom of the page, scrolling page by page with a delay between each scroll.
Parameters:
NameTypeAttributesDefaultDescription
delayTimenumber<optional>
250The delay time in milliseconds between each scroll.
Returns:
A promise that resolves when the scrolling to the bottom is completed.
Type: 
Promise.<void>