Scroll interaction
Added support for scrolling in browser windows. Scroll
You can now programmatically scroll in three ways:
Scroll by relative amount
Use scrollBy
to scroll a specific amount horizontally or vertically from the current position:
xAxis
: Scroll horizontally by pixels or percentage (e.g. “100px” or “50%”). Positive values scroll right, negative values scroll left.yAxis
: Scroll vertically by pixels or percentage (e.g. “100px” or “50%”). Positive values scroll down, negative values scroll up.
Scroll to page edges
Use scrollToEdge
to quickly navigate to the edges of the page:
xAxis
: Scroll to “left” or “right” edgeyAxis
: Scroll to “top” or “bottom” edge
Scroll to specific elements
Use scrollToElement
to scroll to elements matching a natural language description (e.g. “the search box”, “the submit button at the bottom of the form”).
When
scrollToElement
is provided, it takes precedence over scrollBy
and scrollToEdge
configurations, and scrollBy
/scrollToEdge
will be ignoredFor more details, see the API reference.