Scroll Web Element
Command description
Scroll at a specified web element without taking control of the physical mouse pointer.
If the element is outside the viewport, the command first scrolls it into view.
Scroll distances use physical pixels. JavaScript element.getBoundingClientRect() returns CSS pixels; multiply them by devicePixelRatio to obtain physical pixels.
The width, height, position, and slider CAPTCHA distance obtained from web elements are all measured in physical pixels.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Webpage Object | WebPage | Webpage containing the target element |
| Web Element | WebElement or str (captured element UID, not element name, not ms-rpa-id) | Select a captured element or one returned by Get Web Element, Get Similar Web Elements, or Get Related Web Elements |
| Scroll Method | enum | CDP Silent Scroll |
| Horizontal Scroll Distance | number | Horizontal distance in physical pixels; positive scrolls right and negative scrolls left |
| Vertical Scroll Distance | number | Vertical distance in physical pixels; positive scrolls down and negative scrolls up |
| Mouse Pointer Position | enum | Random, Center; position within the element at which to scroll |
| Element Wait Duration | number | Maximum time to wait for the element to appear, in seconds |
Command Output Parameters
None
Type definition reference
Scrolling method
| Scroll method | Description |
|---|---|
| CDP Silent Scroll | Scrolls through Chrome CDP without using the physical mouse or bringing the browser forward. It can run when the browser is off-screen or covered by another window |
tip
- Install the Runavelo browser extension before using this command.
- CDP Silent Scroll requires Runavelo 7.7.0 or later and browser extension 2.4.0 or later.