scroll
Performs a single scroll gesture on the container element matching string tag in the specified direction.
Primary method for scrolling scrollable containers like LazyColumn, LazyRow, or scrollable Columns. Applies a 200px displacement step per invocation:
Desktop JVM, Android, iOS: Dispatches a 200px Compose
ScrollByaction to the scrollable container.WasmJs: Dispatches 10 incremental
mouse.wheel()steps totaling 200px over 500ms to simulate smooth web scrolling.
Tip: To reveal off-screen items in a
LazyColumnorLazyRowwithout calculating pixel distances, prefer using scrollUntilVisible.
Example Usage
scroll("item_list", ScrollDirection.Down)
scroll("image_gallery", ScrollDirection.Right)Parameters
The testTag string or visible text of the scrollable container.
The ScrollDirection (Up, Down, Left, Right).
See also
Performs a single scroll gesture on the container element matching selector in the specified direction.
Advanced variant using explicit selectors for scrollable container targeting. Applies a 200px displacement step per invocation.
Example Usage
scroll(tag("main_scroll_view"), ScrollDirection.Down)Parameters
The explicit Selector rule targeting the scrollable container.
The ScrollDirection (Up, Down, Left, Right).