mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-26 08:59:26 -05:00
1.1 KiB
1.1 KiB
title: scrollintoview comments: true
Scroll an element into view.
| Returns | the element that was scrolled into view |
| Timeout | cy.scrollIntoView will retry for the duration of the defaultCommandTimeout |
cy.scrollIntoView()
Scroll to the element found in the previous command into view.
Options
Pass in an options object to change the default behavior of cy.scrollIntoView.
| Option | Default | Notes |
|---|---|---|
duration |
0 |
Scrolls over the duration (in ms) |
easing |
swing |
Will scroll with the easing animation |
offset |
{top: 0, left: 0} |
Amount to scroll after the element has been scrolled into view |
timeout |
defaultCommandTimeout |
Total time to retry the scroll |
log |
true |
whether to display command in command log |