Classes
Methods
(async) byLines(lines) → {Promise.<void>}
Scrolls the page by the specified number of lines. This method is only supported in Firefox.
Parameters:
Name | Type | Description |
---|---|---|
lines | number | The 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:
Name | Type | Description |
---|---|---|
pages | number | The 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:
Name | Type | Description |
---|---|---|
Xpixels | number | The number of pixels to scroll horizontally. |
Ypixels | number | The 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:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
delayTime | number | <optional> | 250 | The delay time in milliseconds between each scroll. |
Returns:
A promise that resolves when the scrolling to the bottom is completed.
- Type:
- Promise.<void>