Best Practices for Scroll & Scroll Until “X”

This section outlines the recommended best practices for writing stable, deterministic, and high-precision scroll commands in Drizz. These guidelines ensure that both Scroll and Scroll Until “X” actions behave consistently across varying layouts, content densities, and UI states. By providing clear direction, explicit targets, and contextual intent, teams can achieve highly reliable movement through screens, lists, sections, and dynamic content.

  1. Always specify the scroll direction: Scrolling must explicitly indicate down, up, left, or right, matching how a real user performs the gesture. The direction is determined based on natural thumb movement—for example, to move the screen upwards, a user swipes from bottom to top, which corresponds to “Scrolling Up”.

  2. Use double quotes for all scroll targets: Quoted targets ensure precise and deterministic matching.

Example: Scroll down until "Checkout" is visible

  1. Provide clear and unambiguous intent:

Adding context strengthens AI understanding and reduces ambiguity.

Example: Scroll down until you find 4 product cards under "Beauty" header

  1. Use section-level context when scrolling under headers:

Header-based references guide Drizz to look within the correct grouping or category. Ideal for category pages, segmented sections, and grouped lists.

  1. Use container-level scrolling when multiple scrollable regions exist:

Direct the scroll to the intended container to avoid unintended page movement. Example: Scroll down inside product list

  1. Prefer Scroll Until “X” when the destination is known:

It reduces blind scrolling, improves flow predictability and stabilizes navigation.

  1. Leverage Drizz’s self-heal mechanism:

Drizz automatically adjusts scroll behavior when blocked by sticky headers, UI overlaps, or nested scroll views.

Avoid scrolling during UI transitions or loading states: Wait for the interface to settle before issuing a scroll command to prevent inconsistent behavior.

Last updated

Was this helpful?