Skip to content

Win Scroll

Type: win-scroll  ·  Package: Desktop Activities v1.0.8

Scrolls an element with a scroll bar —a long list, a grid, a panel— in the given direction. Useful to bring into view an item or a row that is outside the visible area before interacting with it.

It locates the scrollable element by its selector, brings its window to the front and scrolls it amount steps in the given direction:

  • If the control supports the UIA Scroll pattern, each step moves 10 % of the total range (never past the start or the end). If the control can’t scroll in that direction, nothing happens.
  • If it doesn’t, it puts the mouse at the control’s center and turns the mouse wheel one notch per amount (horizontal wheel for left/right).
ParameterTypeDefaultDescription
selectorselector—The scrollable element (the list, grid or panel, not an item inside it).
ParameterTypeDefaultDescription
sessionZoanDesktopSession—Win Attach session. Inside a body it is taken automatically; without a session, the selector must include the window.
directionstringdownDirection: down · up · right · left.
amountint3Number of scroll steps, from 1 to 20 (values outside that range are clamped).
timeoutnumber30000Maximum ms to wait for the element. Empty = the project’s UI timeout or, if not set, 30000.

This activity does not return a value.

MessageCause and fix
Element not found with selector {…}.See common errors.

If the content doesn’t move, check that the selector points to the container with the scroll bar and not to an element inside it.

Win Scroll selector = (list "Results") direction = down amount = 5
Win Click selector = (item "Order 1042")