{
  "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": "c4ad6f88c531de58221c73dd91a75af7138334b8",
    "updated_at": "2026-11-10T01:15:02.829Z",
    "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
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/scrollintoview#syntax",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.scrollIntoView()\n.scrollIntoView(options)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('footer').scrollIntoView() // Scrolls 'footer' into view\n```\n\n**Incorrect Usage**\n\n```\ncy.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\n```\n\n### Arguments\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.scrollIntoView()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `duration` | `0` | Time in ms to animate the scroll over, as a number or a numeric string such as `'500'` |\n| `easing` | `swing` | Easing animation for the scroll: `swing` or `linear` (any other value throws an error) |\n| `log` | `true` | Displays the command in the [Command Log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `offset` | `{top: 0, left: 0}` | 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` |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for assertions chained after `.scrollIntoView()` to pass before [timing out](#Timeouts) |\n\n### Yields\n\n*   `.scrollIntoView()` yields the same subject it was given.\n*   It is [unsafe](/llm/markdown/app/core-concepts/retry-ability.md#Only-queries-are-retried) to chain further commands that rely on the subject after `.scrollIntoView()`.\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 288
    },
    {
      "id": "api/commands/scrollintoview#usage",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Usage",
      "heading_level": 3,
      "content_markdown": "### Usage\n\n**Correct Usage**\n\n```\ncy.get('footer').scrollIntoView() // Scrolls 'footer' into view\n```\n\n**Incorrect Usage**\n\n```\ncy.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\n```\n",
      "section": "api",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 56
    },
    {
      "id": "api/commands/scrollintoview#arguments",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.scrollIntoView()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `duration` | `0` | Time in ms to animate the scroll over, as a number or a numeric string such as `'500'` |\n| `easing` | `swing` | Easing animation for the scroll: `swing` or `linear` (any other value throws an error) |\n| `log` | `true` | Displays the command in the [Command Log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `offset` | `{top: 0, left: 0}` | 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` |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for assertions chained after `.scrollIntoView()` to pass before [timing out](#Timeouts) |\n",
      "section": "api",
      "anchors": [
        "arguments"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 189
    },
    {
      "id": "api/commands/scrollintoview#examples",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### Scrolling\n\n```\ncy.get('button#checkout').scrollIntoView()\n```\n\n#### Check that an element is in the viewport\n\n[Visibility](/llm/markdown/app/core-concepts/interacting-with-elements.md#Visibility) 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.\n\n```\ncy.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'))\n```\n\n#### Scroll an item inside a scrollable container\n\nWhen the element sits inside a scrollable container, such as a results list, `.scrollIntoView()` scrolls that container to reach it, as described in [Where the element lands after scrolling](#Where-the-element-lands-after-scrolling).\n\n```\ncy.get('[data-cy=\"results\"] li').eq(40).scrollIntoView()\ncy.get('[data-cy=\"results\"]').its('0.scrollTop').should('be.greaterThan', 0)\n```\n\n### Options\n\n#### Use linear easing animation to scroll\n\n```\ncy.get('.next-page').scrollIntoView({ easing: 'linear' })\n```\n\n#### Animate the scroll to an element over 2000ms\n\n```\ncy.get('footer').scrollIntoView({ duration: 2000 })\n```\n\n#### Scroll 150px past the top of an element\n\n```\ncy.get('#nav').scrollIntoView({ offset: { top: 150, left: 0 } })\n```\n\n#### Leave room for a fixed header\n\nA negative `offset` stops short of the element, so it lands below a fixed header instead of underneath it.\n\n```\ncy.get('#pricing').scrollIntoView({ offset: { top: -80, left: 0 } })\n```\n\n### Workflows\n\n#### Show a back-to-top button after scrolling\n\nSticky 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.\n\n```\ncy.get('footer').scrollIntoView()\ncy.get('[data-cy=\"back-to-top\"]').should('have.class', 'is-shown')\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 313
    },
    {
      "id": "api/commands/scrollintoview#scrolling",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Scrolling",
      "heading_level": 3,
      "content_markdown": "### Scrolling\n\n```\ncy.get('button#checkout').scrollIntoView()\n```\n\n#### Check that an element is in the viewport\n\n[Visibility](/llm/markdown/app/core-concepts/interacting-with-elements.md#Visibility) 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.\n\n```\ncy.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'))\n```\n\n#### Scroll an item inside a scrollable container\n\nWhen the element sits inside a scrollable container, such as a results list, `.scrollIntoView()` scrolls that container to reach it, as described in [Where the element lands after scrolling](#Where-the-element-lands-after-scrolling).\n\n```\ncy.get('[data-cy=\"results\"] li').eq(40).scrollIntoView()\ncy.get('[data-cy=\"results\"]').its('0.scrollTop').should('be.greaterThan', 0)\n```\n",
      "section": "api",
      "anchors": [
        "scrolling"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 141
    },
    {
      "id": "api/commands/scrollintoview#check-that-an-element-is-in-the-viewport",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Check that an element is in the viewport",
      "heading_level": 4,
      "content_markdown": "#### Check that an element is in the viewport\n\n[Visibility](/llm/markdown/app/core-concepts/interacting-with-elements.md#Visibility) 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.\n\n```\ncy.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'))\n```\n",
      "section": "api",
      "anchors": [
        "check-that-an-element-is-in-the-viewport"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 77
    },
    {
      "id": "api/commands/scrollintoview#scroll-an-item-inside-a-scrollable-container",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Scroll an item inside a scrollable container",
      "heading_level": 4,
      "content_markdown": "#### Scroll an item inside a scrollable container\n\nWhen the element sits inside a scrollable container, such as a results list, `.scrollIntoView()` scrolls that container to reach it, as described in [Where the element lands after scrolling](#Where-the-element-lands-after-scrolling).\n\n```\ncy.get('[data-cy=\"results\"] li').eq(40).scrollIntoView()\ncy.get('[data-cy=\"results\"]').its('0.scrollTop').should('be.greaterThan', 0)\n```\n",
      "section": "api",
      "anchors": [
        "scroll-an-item-inside-a-scrollable-container"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 57
    },
    {
      "id": "api/commands/scrollintoview#options",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Options",
      "heading_level": 3,
      "content_markdown": "### Options\n\n#### Use linear easing animation to scroll\n\n```\ncy.get('.next-page').scrollIntoView({ easing: 'linear' })\n```\n\n#### Animate the scroll to an element over 2000ms\n\n```\ncy.get('footer').scrollIntoView({ duration: 2000 })\n```\n\n#### Scroll 150px past the top of an element\n\n```\ncy.get('#nav').scrollIntoView({ offset: { top: 150, left: 0 } })\n```\n\n#### Leave room for a fixed header\n\nA negative `offset` stops short of the element, so it lands below a fixed header instead of underneath it.\n\n```\ncy.get('#pricing').scrollIntoView({ offset: { top: -80, left: 0 } })\n```\n",
      "section": "api",
      "anchors": [
        "options"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 116
    },
    {
      "id": "api/commands/scrollintoview#leave-room-for-a-fixed-header",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Leave room for a fixed header",
      "heading_level": 4,
      "content_markdown": "#### Leave room for a fixed header\n\nA negative `offset` stops short of the element, so it lands below a fixed header instead of underneath it.\n\n```\ncy.get('#pricing').scrollIntoView({ offset: { top: -80, left: 0 } })\n```\n",
      "section": "api",
      "anchors": [
        "leave-room-for-a-fixed-header"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 49
    },
    {
      "id": "api/commands/scrollintoview#workflows",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Workflows",
      "heading_level": 3,
      "content_markdown": "### Workflows\n\n#### Show a back-to-top button after scrolling\n\nSticky 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.\n\n```\ncy.get('footer').scrollIntoView()\ncy.get('[data-cy=\"back-to-top\"]').should('have.class', 'is-shown')\n```\n",
      "section": "api",
      "anchors": [
        "workflows"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 53
    },
    {
      "id": "api/commands/scrollintoview#show-a-back-to-top-button-after-scrolling",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Show a back-to-top button after scrolling",
      "heading_level": 4,
      "content_markdown": "#### Show a back-to-top button after scrolling\n\nSticky 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.\n\n```\ncy.get('footer').scrollIntoView()\ncy.get('[data-cy=\"back-to-top\"]').should('have.class', 'is-shown')\n```\n",
      "section": "api",
      "anchors": [
        "show-a-back-to-top-button-after-scrolling"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 51
    },
    {
      "id": "api/commands/scrollintoview#notes",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n### Where the element lands after scrolling\n\n`.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.\n\n### Actionability\n\n`.scrollIntoView()` doesn't run the [actionability](/llm/markdown/app/core-concepts/interacting-with-elements.md) checks that commands like [`.click()`](/llm/markdown/api/commands/click.md) do. It scrolls an element even when the element is hidden, disabled, or covered by another element.\n\n### Skip .scrollIntoView() before action commands\n\nAction commands such as [`.click()`](/llm/markdown/api/commands/click.md) and [`.type()`](/llm/markdown/api/commands/type.md) scroll the element into view before acting on it, so a `.scrollIntoView()` in front of them adds nothing. The [`scrollBehavior`](/llm/markdown/app/references/configuration.md#Actionability) option controls where the element lands, and setting it to `false` turns this scrolling off.\n\n```\ncy.get('#submit').scrollIntoView().click() // ❌ the scroll is redundant\ncy.get('#submit').click() // ✅ .click() scrolls the element into view itself\n```\n\n### Choosing between .scrollTo() and .scrollIntoView()\n\n`.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.\n\n```\ncy.get('#feed').scrollTo('bottom') // scrolls the container itself\ncy.get('#item-5').scrollIntoView() // scrolls until this item is in view\n```\n\nCompare where each call leaves the list:\n\n### Snapshots don't show scroll positions\n\nSnapshots don't capture scroll positions. To watch the scrolling, step through the commands with [`.pause()`](/llm/markdown/api/commands/pause.md) or [watch the video of the test run](/llm/markdown/app/guides/screenshots-and-videos.md#Videos).\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 363
    },
    {
      "id": "api/commands/scrollintoview#where-the-element-lands-after-scrolling",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Where the element lands after scrolling",
      "heading_level": 3,
      "content_markdown": "### Where the element lands after scrolling\n\n`.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.\n",
      "section": "api",
      "anchors": [
        "where-the-element-lands-after-scrolling"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 97
    },
    {
      "id": "api/commands/scrollintoview#skip-scrollintoview-before-action-commands",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Skip .scrollIntoView() before action commands",
      "heading_level": 3,
      "content_markdown": "### Skip .scrollIntoView() before action commands\n\nAction commands such as [`.click()`](/llm/markdown/api/commands/click.md) and [`.type()`](/llm/markdown/api/commands/type.md) scroll the element into view before acting on it, so a `.scrollIntoView()` in front of them adds nothing. The [`scrollBehavior`](/llm/markdown/app/references/configuration.md#Actionability) option controls where the element lands, and setting it to `false` turns this scrolling off.\n\n```\ncy.get('#submit').scrollIntoView().click() // ❌ the scroll is redundant\ncy.get('#submit').click() // ✅ .click() scrolls the element into view itself\n```\n",
      "section": "api",
      "anchors": [
        "skip-scrollintoview-before-action-commands"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 89
    },
    {
      "id": "api/commands/scrollintoview#choosing-between-scrollto-and-scrollintoview",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Choosing between .scrollTo() and .scrollIntoView()",
      "heading_level": 3,
      "content_markdown": "### Choosing between .scrollTo() and .scrollIntoView()\n\n`.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.\n\n```\ncy.get('#feed').scrollTo('bottom') // scrolls the container itself\ncy.get('#item-5').scrollIntoView() // scrolls until this item is in view\n```\n\nCompare where each call leaves the list:\n",
      "section": "api",
      "anchors": [
        "choosing-between-scrollto-and-scrollintoview"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 96
    },
    {
      "id": "api/commands/scrollintoview#rules",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Rules",
      "heading_level": 2,
      "content_markdown": "## Rules\n\n### Requirements\n\n*   `.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.\n\n### Assertions\n\n*   `.scrollIntoView()` runs once and is not retried. Assertions chained after `.scrollIntoView()` retry until they pass or time out. See [Only queries are retried](/llm/markdown/app/core-concepts/retry-ability.md#Only-queries-are-retried).\n\n### Timeouts\n\n*   `.scrollIntoView()` can time out waiting for assertions you've added to pass.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 93
    },
    {
      "id": "api/commands/scrollintoview#command-log",
      "doc_id": "api/commands/scrollintoview",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**_Scroll a button into view inside a horizontal container_**\n\n```\ncy.get('#scroll-horizontal button').scrollIntoView()\ncy.get('#scroll-horizontal').its('0.scrollLeft').should('be.greaterThan', 0)\n```\n\nThe commands above display in the Command Log as:\n\nClicking the `scrollIntoView` command in the Command Log prints the following to the console:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 55
    },
    {
      "id": "api/commands/scrollintoview#see-also",
      "doc_id": "api/commands/scrollintoview",
      "heading": "See also",
      "heading_level": 2,
      "content_markdown": "## See also\n\n*   [`.click()`](/llm/markdown/api/commands/click.md) - Scrolls the element into view before clicking it\n*   [`cy.scrollTo()`](/llm/markdown/api/commands/scrollto.md)\n*   [`cy.viewport()`](/llm/markdown/api/commands/viewport.md) - Set the window size, which decides what counts as in view\n*   [Scrolling in Interacting with Elements](/llm/markdown/app/core-concepts/interacting-with-elements.md#Scrolling) - How action commands scroll elements into view on their own\n",
      "section": "api",
      "anchors": [
        "see-also"
      ],
      "path": "/llm/json/chunked/api/commands/scrollintoview.json",
      "token_estimate": 63
    }
  ]
}