Skip to content

Scroll

Type: page-scroll  ·  Package: Browser v1.0.9

Scrolls the page. It has two uses: bringing an element into view (passing its selector) or scrolling the page by a number of pixels (with x/y). Useful on long pages, lists with progressive loading (infinite scroll) or to make sure an element is visible before interacting with it.

  • If you set a selector, it scrolls as needed (the page and any scrollable containers) until that element is in view; if it already is, it does nothing. In this mode x and y are ignored.
  • Otherwise, it scrolls the page window by the number of pixels given in x (horizontal) and y (vertical). Positive values go down/right; negative values, the opposite. If you leave y empty, it scrolls down 500 px.

To scroll an inner panel with its own scrollbar (a list inside a modal), use a selector of an element in that panel: scrolling the whole page won’t move it.

None.

ParameterTypeDefaultDescription
pageZoanPageSession—The page session. Omit it inside a body; outside, pass the session variable (e.g. page = page).
selectorselector—Element to bring into view. Empty = scroll the whole page.
xint0Pixels to scroll horizontally (without selector).
yint500Pixels to scroll vertically (without selector). E.g. 500 (down), -500 (up).

This activity does not return a value.

Scroll down to load more results (infinite scroll):

For Loop from = 1 to = 6 indexVariable = i
└─ activities:
Page Scroll y = 1000
Delay milliseconds = 800 // give more items time to load
Extract Structured Data mode = smart cells = (.resultado) → output: resultados

Bring a button into view before clicking it:

Page Scroll selector = (#botonPagar)
Page Click selector = (#botonPagar)
MessageCause and fix
Timeout 30000ms exceededWith selector, the element didn’t appear or couldn’t be brought into view within 30 s. Check the selector or wait first with Wait For.
'page' must be a ZoanPageSession.page is empty outside a body.