Skip to main content

scroll

plugin.browser.scroll(direction: string, pixels: string, options?: BrowserOperationOptions): Promise<BrowserActionResponseData>

Scrolls the current page in a specified direction by a specified number of pixels.

Parameters

ParameterTypeRequiredDescription
directionstringYesThe direction to scroll.
pixelsstringYesThe number of pixels to scroll.
optionsBrowserOperationOptionsNoOptional browser operation options

Returns

Promise<BrowserActionResponseData> — A promise that resolves when the scroll action is complete.

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.browser.scroll('direction', 'pixels');
console.log(result);