{
  "doc": {
    "id": "api/commands/scrollintoview",
    "title": "cy.scrollIntoView()",
    "description": "Scroll an element into view in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/scrollintoview.md",
    "version": "5a232a3cf094b8f928b1179ce5af6a5046296fac",
    "updated_at": "2026-11-13T01:14:31.437Z",
    "headings": [
      {
        "id": "api/commands/scrollintoview#scrollintoview",
        "text": "scrollIntoView",
        "level": 1
      },
      {
        "id": "api/commands/scrollintoview#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/scrollintoview#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#yields",
        "text": "Yields",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/scrollintoview#scrolling",
        "text": "Scrolling",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#check-that-an-element-is-in-the-viewport",
        "text": "Check that an element is in the viewport",
        "level": 4
      },
      {
        "id": "api/commands/scrollintoview#scroll-an-item-inside-a-scrollable-container",
        "text": "Scroll an item inside a scrollable container",
        "level": 4
      },
      {
        "id": "api/commands/scrollintoview#options",
        "text": "Options",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#use-linear-easing-animation-to-scroll",
        "text": "Use linear easing animation to scroll",
        "level": 4
      },
      {
        "id": "api/commands/scrollintoview#animate-the-scroll-to-an-element-over-2000ms",
        "text": "Animate the scroll to an element over 2000ms",
        "level": 4
      },
      {
        "id": "api/commands/scrollintoview#scroll-150px-past-the-top-of-an-element",
        "text": "Scroll 150px past the top of an element",
        "level": 4
      },
      {
        "id": "api/commands/scrollintoview#leave-room-for-a-fixed-header",
        "text": "Leave room for a fixed header",
        "level": 4
      },
      {
        "id": "api/commands/scrollintoview#workflows",
        "text": "Workflows",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#show-a-back-to-top-button-after-scrolling",
        "text": "Show a back-to-top button after scrolling",
        "level": 4
      },
      {
        "id": "api/commands/scrollintoview#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/scrollintoview#where-the-element-lands-after-scrolling",
        "text": "Where the element lands after scrolling",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#actionability",
        "text": "Actionability",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#skip-scrollintoview-before-action-commands",
        "text": "Skip .scrollIntoView() before action commands",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#choosing-between-scrollto-and-scrollintoview",
        "text": "Choosing between .scrollTo() and .scrollIntoView()",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#snapshots-dont-show-scroll-positions",
        "text": "Snapshots don't show scroll positions",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/scrollintoview#requirements",
        "text": "Requirements",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#assertions",
        "text": "Assertions",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#timeouts",
        "text": "Timeouts",
        "level": 3
      },
      {
        "id": "api/commands/scrollintoview#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/scrollintoview#history",
        "text": "History",
        "level": 2
      },
      {
        "id": "api/commands/scrollintoview#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "content": {
    "type": "root",
    "children": [
      {
        "type": "heading",
        "depth": 1,
        "children": [
          {
            "type": "text",
            "value": "scrollIntoView"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Scroll the nearest scrollable container, or the window, until an element is in view."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "It is "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/core-concepts/retry-ability.md#Only-queries-are-retried",
            "children": [
              {
                "type": "text",
                "value": "unsafe"
              }
            ]
          },
          {
            "type": "text",
            "value": " to chain further commands that rely on the subject after `.scrollIntoView()`."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Syntax"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": ".scrollIntoView()\n.scrollIntoView(options)"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Usage"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Correct Usage"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('footer').scrollIntoView() // Scrolls 'footer' into view"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Incorrect Usage"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.scrollIntoView('footer') // Errors, cannot be chained off 'cy'\ncy.window().scrollIntoView() // Errors, 'window' doesn't yield a DOM element\ncy.get('li').scrollIntoView() // Errors, 'li' yields more than one element"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Arguments"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "options (Object)"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Pass in an options object to change the default behavior of `.scrollIntoView()`."
          }
        ]
      },
      {
        "type": "table",
        "align": [
          null,
          null,
          null
        ],
        "children": [
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Option"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Default"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Description"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`duration`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`0`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Time in ms to animate the scroll over, as a number or a numeric string such as `'500'`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`easing`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`swing`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Easing animation for the scroll: `swing` or `linear` (any other value throws an error)"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`log`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`true`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Displays the command in the "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/core-concepts/open-mode.md#Command-Log",
                    "children": [
                      {
                        "type": "text",
                        "value": "Command Log"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`offset`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`{top: 0, left: 0}`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Pixels to scroll past the element, or short of it when negative, to leave room above or to the left; a key left out defaults to `0`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`timeout`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/configuration.md#Timeouts",
                    "children": [
                      {
                        "type": "text",
                        "value": "`defaultCommandTimeout`"
                      }
                    ]
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Time to wait for assertions chained after `.scrollIntoView()` to pass before "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "#Timeouts",
                    "children": [
                      {
                        "type": "text",
                        "value": "timing out"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Yields"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`.scrollIntoView()` yields the same subject it was given."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "It is "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/core-concepts/retry-ability.md#Only-queries-are-retried",
                    "children": [
                      {
                        "type": "text",
                        "value": "unsafe"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": " to chain further commands that rely on the subject after `.scrollIntoView()`."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Examples"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Scrolling"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('button#checkout').scrollIntoView()"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Check that an element is in the viewport"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/core-concepts/interacting-with-elements.md#Visibility",
            "children": [
              {
                "type": "text",
                "value": "Visibility"
              }
            ]
          },
          {
            "type": "text",
            "value": " doesn't account for the viewport, so `.should('be.visible')` passes for an element that is scrolled out of view. To confirm the scroll worked, check the element's position instead. This checks that its top edge is inside the viewport."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('button#checkout').scrollIntoView()\ncy.get('button#checkout')\n  .invoke('get', 0)\n  .invoke('getBoundingClientRect')\n  .its('top')\n  .should('be.within', 0, Cypress.config('viewportHeight'))"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Scroll an item inside a scrollable container"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "When the element sits inside a scrollable container, such as a results list, `.scrollIntoView()` scrolls that container to reach it, as described in "
          },
          {
            "type": "link",
            "title": null,
            "url": "#Where-the-element-lands-after-scrolling",
            "children": [
              {
                "type": "text",
                "value": "Where the element lands after scrolling"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('[data-cy=\"results\"] li').eq(40).scrollIntoView()\ncy.get('[data-cy=\"results\"]').its('0.scrollTop').should('be.greaterThan', 0)"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Options"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Use linear easing animation to scroll"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('.next-page').scrollIntoView({ easing: 'linear' })"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Animate the scroll to an element over 2000ms"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('footer').scrollIntoView({ duration: 2000 })"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Scroll 150px past the top of an element"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('#nav').scrollIntoView({ offset: { top: 150, left: 0 } })"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Leave room for a fixed header"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "A negative `offset` stops short of the element, so it lands below a fixed header instead of underneath it."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('#pricing').scrollIntoView({ offset: { top: -80, left: 0 } })"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Workflows"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Show a back-to-top button after scrolling"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Sticky headers, \"back to top\" buttons, and lazy-loaded images change as the page scrolls. Scroll to a point on the page, then assert on the change."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('footer').scrollIntoView()\ncy.get('[data-cy=\"back-to-top\"]').should('have.class', 'is-shown')"
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Notes"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Where the element lands after scrolling"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "`.scrollIntoView()` scrolls the element's nearest scrollable ancestor, or the window when there isn't one, until the element's top-left corner lines up with the top-left of that container, as far as the container can scroll. Use the `offset` option to adjust where it lands. When the scrollable ancestor is a container inside the page, Cypress first scrolls that container into view, then scrolls the element within it."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Actionability"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "`.scrollIntoView()` doesn't run the "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/core-concepts/interacting-with-elements.md",
            "children": [
              {
                "type": "text",
                "value": "actionability"
              }
            ]
          },
          {
            "type": "text",
            "value": " checks that commands like "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/click.md",
            "children": [
              {
                "type": "text",
                "value": "`.click()`"
              }
            ]
          },
          {
            "type": "text",
            "value": " do. It scrolls an element even when the element is hidden, disabled, or covered by another element."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Skip .scrollIntoView() before action commands"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Action commands such as "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/click.md",
            "children": [
              {
                "type": "text",
                "value": "`.click()`"
              }
            ]
          },
          {
            "type": "text",
            "value": " and "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/type.md",
            "children": [
              {
                "type": "text",
                "value": "`.type()`"
              }
            ]
          },
          {
            "type": "text",
            "value": " scroll the element into view before acting on it, so a `.scrollIntoView()` in front of them adds nothing. The "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/references/configuration.md#Actionability",
            "children": [
              {
                "type": "text",
                "value": "`scrollBehavior`"
              }
            ]
          },
          {
            "type": "text",
            "value": " option controls where the element lands, and setting it to `false` turns this scrolling off."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('#submit').scrollIntoView().click() // ❌ the scroll is redundant\ncy.get('#submit').click() // ✅ .click() scrolls the element into view itself"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Choosing between .scrollTo() and .scrollIntoView()"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "`.scrollTo()` scrolls a container, either the window or a scrollable element, to a position. `.scrollIntoView()` scrolls whatever contains an element until that element is in view. To reach a specific item, use `.scrollIntoView()` on the item rather than `.scrollTo()` on its container."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('#feed').scrollTo('bottom') // scrolls the container itself\ncy.get('#item-5').scrollIntoView() // scrolls until this item is in view"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Compare where each call leaves the list:"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Snapshots don't show scroll positions"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Snapshots don't capture scroll positions. To watch the scrolling, step through the commands with "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/pause.md",
            "children": [
              {
                "type": "text",
                "value": "`.pause()`"
              }
            ]
          },
          {
            "type": "text",
            "value": " or "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/guides/screenshots-and-videos.md#Videos",
            "children": [
              {
                "type": "text",
                "value": "watch the video of the test run"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Rules"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Requirements"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`.scrollIntoView()` requires being chained off a command that yields a single DOM element. It throws an error when the subject contains more than one element."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Assertions"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`.scrollIntoView()` runs once and is not retried. Assertions chained after `.scrollIntoView()` retry until they pass or time out. See "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/core-concepts/retry-ability.md#Only-queries-are-retried",
                    "children": [
                      {
                        "type": "text",
                        "value": "Only queries are retried"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": "."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Timeouts"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`.scrollIntoView()` can time out waiting for assertions you've added to pass."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Command Log"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Scroll a button into view inside a horizontal container"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.get('#scroll-horizontal button').scrollIntoView()\ncy.get('#scroll-horizontal').its('0.scrollLeft').should('be.greaterThan', 0)"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "The commands above display in the Command Log as:"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Clicking the `scrollIntoView` command in the Command Log prints the following to the console:"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "History"
          }
        ]
      },
      {
        "type": "table",
        "align": [
          null,
          null
        ],
        "children": [
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Version"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Changes"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/changelog.md#0-20-0",
                    "children": [
                      {
                        "type": "text",
                        "value": "0.20.0"
                      }
                    ]
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`.scrollIntoView()` command added"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "See also"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/api/commands/click.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "`.click()`"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": " - Scrolls the element into view before clicking it"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/api/commands/scrollto.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "`cy.scrollTo()`"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/api/commands/viewport.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "`cy.viewport()`"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": " - Set the window size, which decides what counts as in view"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/core-concepts/interacting-with-elements.md#Scrolling",
                    "children": [
                      {
                        "type": "text",
                        "value": "Scrolling in Interacting with Elements"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": " - How action commands scroll elements into view on their own"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "token_estimate": 1240
}