Skip to main content

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 parametersInput parameter typeDescription
Webpage ObjectWebPageWebpage containing the target element
Web ElementWebElement 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 MethodenumCDP Silent Scroll
Horizontal Scroll DistancenumberHorizontal distance in physical pixels; positive scrolls right and negative scrolls left
Vertical Scroll DistancenumberVertical distance in physical pixels; positive scrolls down and negative scrolls up
Mouse Pointer PositionenumRandom, Center; position within the element at which to scroll
Element Wait DurationnumberMaximum time to wait for the element to appear, in seconds

Command Output Parameters

None

Type definition reference

Scrolling method

Scroll methodDescription
CDP Silent ScrollScrolls 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.

FAQ

See Web Automation FAQ