{
  "doc": {
    "id": "api/commands/check",
    "title": "check | Cypress Documentation",
    "description": "Check checkbox(es) or radio(s) in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/check.md",
    "version": "48b03b5502f7aea1d0454750cce208f775403542",
    "updated_at": "2026-05-20T19:00:20.270Z",
    "headings": [
      {
        "id": "api/commands/check#check",
        "text": "check",
        "level": 1
      },
      {
        "id": "api/commands/check#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/check#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/check#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/check#yields-learn-about-subject-management",
        "text": "Yields Learn about subject management",
        "level": 3
      },
      {
        "id": "api/commands/check#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/check#no-args",
        "text": "No Args",
        "level": 3
      },
      {
        "id": "api/commands/check#check-all-checkboxes",
        "text": "Check all checkboxes",
        "level": 4
      },
      {
        "id": "api/commands/check#select-all-radios",
        "text": "Select all radios",
        "level": 4
      },
      {
        "id": "api/commands/check#check-the-element-with-id-of-saveusername",
        "text": "Check the element with id of 'saveUserName'",
        "level": 4
      },
      {
        "id": "api/commands/check#value",
        "text": "Value",
        "level": 3
      },
      {
        "id": "api/commands/check#select-the-radio-with-the-value-of-us",
        "text": "Select the radio with the value of 'US'",
        "level": 4
      },
      {
        "id": "api/commands/check#values",
        "text": "Values",
        "level": 3
      },
      {
        "id": "api/commands/check#check-the-checkboxes-with-the-values-subscribe-and-accept",
        "text": "Check the checkboxes with the values 'subscribe' and 'accept'",
        "level": 4
      },
      {
        "id": "api/commands/check#options",
        "text": "Options",
        "level": 3
      },
      {
        "id": "api/commands/check#check-an-invisible-checkbox",
        "text": "Check an invisible checkbox",
        "level": 4
      },
      {
        "id": "api/commands/check#find-checked-option",
        "text": "Find checked option",
        "level": 3
      },
      {
        "id": "api/commands/check#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/check#actionability",
        "text": "Actionability",
        "level": 3
      },
      {
        "id": "api/commands/check#the-element-must-first-reach-actionability",
        "text": "The element must first reach actionability",
        "level": 4
      },
      {
        "id": "api/commands/check#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/check#requirements-learn-about-chaining-commands",
        "text": "Requirements Learn about chaining commands",
        "level": 3
      },
      {
        "id": "api/commands/check#assertions-learn-about-assertions",
        "text": "Assertions Learn about assertions",
        "level": 3
      },
      {
        "id": "api/commands/check#timeouts-learn-about-timeouts",
        "text": "Timeouts Learn about timeouts",
        "level": 3
      },
      {
        "id": "api/commands/check#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/check#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/check#syntax",
      "doc_id": "api/commands/check",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.check().check(value).check(values).check(options).check(value, options).check(values, options)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('[type=\"checkbox\"]').check() // Check checkbox elementcy.get('[type=\"radio\"]').first().check() // Check first radio element\n```\n\n**Incorrect Usage**\n\n```\ncy.check('[type=\"checkbox\"]') // Errors, cannot be chained off 'cy'cy.get('p:first').check() // Errors, '.get()' does not yield checkbox or radio\n```\n\n### Arguments\n\n**value _(String)_**\n\nValue of checkbox or radio that should be checked.\n\n**values _(Array)_**\n\nValues of checkboxes or radios that should be checked.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.check()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `animationDistanceThreshold` | [`animationDistanceThreshold`](/llm/markdown/app/references/configuration.md#Actionability) | The distance in pixels an element must exceed over time to be [considered animating](/llm/markdown/app/core-concepts/interacting-with-elements.md#Animations). |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `force` | `false` | Forces the action, disables [waiting for actionability](#Assertions) |\n| `scrollBehavior` | [`scrollBehavior`](/llm/markdown/app/references/configuration.md#Actionability) | Viewport position to where an element [should be scrolled](/llm/markdown/app/core-concepts/interacting-with-elements.md#Scrolling) before executing the command |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.check()` to resolve before [timing out](#Timeouts) |\n| `waitForAnimations` | [`waitForAnimations`](/llm/markdown/app/references/configuration.md#Actionability) | Whether to wait for elements to [finish animating](/llm/markdown/app/core-concepts/interacting-with-elements.md#Animations) before executing the command. |\n\n### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)\n\n*   `.check()` 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 `.check()`.\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 300
    },
    {
      "id": "api/commands/check#usage",
      "doc_id": "api/commands/check",
      "heading": "Usage",
      "heading_level": 3,
      "content_markdown": "### Usage\n\n**Correct Usage**\n\n```\ncy.get('[type=\"checkbox\"]').check() // Check checkbox elementcy.get('[type=\"radio\"]').first().check() // Check first radio element\n```\n\n**Incorrect Usage**\n\n```\ncy.check('[type=\"checkbox\"]') // Errors, cannot be chained off 'cy'cy.get('p:first').check() // Errors, '.get()' does not yield checkbox or radio\n```\n",
      "section": "api",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 49
    },
    {
      "id": "api/commands/check#arguments",
      "doc_id": "api/commands/check",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**value _(String)_**\n\nValue of checkbox or radio that should be checked.\n\n**values _(Array)_**\n\nValues of checkboxes or radios that should be checked.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.check()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `animationDistanceThreshold` | [`animationDistanceThreshold`](/llm/markdown/app/references/configuration.md#Actionability) | The distance in pixels an element must exceed over time to be [considered animating](/llm/markdown/app/core-concepts/interacting-with-elements.md#Animations). |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `force` | `false` | Forces the action, disables [waiting for actionability](#Assertions) |\n| `scrollBehavior` | [`scrollBehavior`](/llm/markdown/app/references/configuration.md#Actionability) | Viewport position to where an element [should be scrolled](/llm/markdown/app/core-concepts/interacting-with-elements.md#Scrolling) before executing the command |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.check()` to resolve before [timing out](#Timeouts) |\n| `waitForAnimations` | [`waitForAnimations`](/llm/markdown/app/references/configuration.md#Actionability) | Whether to wait for elements to [finish animating](/llm/markdown/app/core-concepts/interacting-with-elements.md#Animations) before executing the command. |\n",
      "section": "api",
      "anchors": [
        "arguments"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 201
    },
    {
      "id": "api/commands/check#yields-learn-about-subject-management",
      "doc_id": "api/commands/check",
      "heading": "Yields Learn about subject management",
      "heading_level": 3,
      "content_markdown": "### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)\n\n*   `.check()` 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 `.check()`.\n",
      "section": "api",
      "anchors": [
        "yields-learn-about-subject-management"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 40
    },
    {
      "id": "api/commands/check#examples",
      "doc_id": "api/commands/check",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### No Args\n\n#### Check all checkboxes\n\n```\ncy.get('[type=\"checkbox\"]').check()\n```\n\n#### Select all radios\n\n```\ncy.get('[type=\"radio\"]').check()\n```\n\n#### Check the element with id of 'saveUserName'\n\n```\ncy.get('#saveUserName').check()\n```\n\n### Value\n\n#### Select the radio with the value of 'US'\n\n```\n<form>  <input type=\"radio\" id=\"ca-country\" value=\"CA\" />  <label for=\"ca-country\">Canada</label>  <input type=\"radio\" id=\"us-country\" value=\"US\" />  <label for=\"us-country\">United States</label></form>\n```\n\n```\ncy.get('[type=\"radio\"]').check('US')\n```\n\n### Values\n\n#### Check the checkboxes with the values 'subscribe' and 'accept'\n\n```\n<form>  <input type=\"checkbox\" id=\"subscribe\" value=\"subscribe\" />  <label for=\"subscribe\">Subscribe to newsletter?</label>  <input type=\"checkbox\" id=\"acceptTerms\" value=\"accept\" />  <label for=\"acceptTerms\">Accept terms and conditions.</label></form>\n```\n\n```\ncy.get('form input').check(['subscribe', 'accept'])\n```\n\n### Options\n\n#### Check an invisible checkbox\n\nYou can ignore Cypress' default behavior of checking that the element is visible, clickable and not disabled by setting `force` to `true` in the options.\n\n```\ncy.get('.action-checkboxes')  .should('not.be.visible') // Passes  .check({ force: true })  .should('be.checked') // Passes\n```\n\n### Find checked option\n\nYou can get the currently checked option using the jQuery's [:checked selector](https://api.jquery.com/checked-selector/).\n\n```\n<form id=\"pick-fruit\">  <input type=\"radio\" name=\"fruit\" value=\"orange\" id=\"orange\" />  <input type=\"radio\" name=\"fruit\" value=\"apple\" id=\"apple\" checked=\"checked\" />  <input type=\"radio\" name=\"fruit\" value=\"banana\" id=\"banana\" /></form>\n```\n\n```\ncy.get('#pick-fruit :checked').should('be.checked').and('have.value', 'apple')\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 253
    },
    {
      "id": "api/commands/check#value",
      "doc_id": "api/commands/check",
      "heading": "Value",
      "heading_level": 3,
      "content_markdown": "### Value\n\n#### Select the radio with the value of 'US'\n\n```\n<form>  <input type=\"radio\" id=\"ca-country\" value=\"CA\" />  <label for=\"ca-country\">Canada</label>  <input type=\"radio\" id=\"us-country\" value=\"US\" />  <label for=\"us-country\">United States</label></form>\n```\n\n```\ncy.get('[type=\"radio\"]').check('US')\n```\n",
      "section": "api",
      "anchors": [
        "value"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 43
    },
    {
      "id": "api/commands/check#select-the-radio-with-the-value-of-us",
      "doc_id": "api/commands/check",
      "heading": "Select the radio with the value of 'US'",
      "heading_level": 4,
      "content_markdown": "#### Select the radio with the value of 'US'\n\n```\n<form>  <input type=\"radio\" id=\"ca-country\" value=\"CA\" />  <label for=\"ca-country\">Canada</label>  <input type=\"radio\" id=\"us-country\" value=\"US\" />  <label for=\"us-country\">United States</label></form>\n```\n\n```\ncy.get('[type=\"radio\"]').check('US')\n```\n",
      "section": "api",
      "anchors": [
        "select-the-radio-with-the-value-of-us"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 40
    },
    {
      "id": "api/commands/check#values",
      "doc_id": "api/commands/check",
      "heading": "Values",
      "heading_level": 3,
      "content_markdown": "### Values\n\n#### Check the checkboxes with the values 'subscribe' and 'accept'\n\n```\n<form>  <input type=\"checkbox\" id=\"subscribe\" value=\"subscribe\" />  <label for=\"subscribe\">Subscribe to newsletter?</label>  <input type=\"checkbox\" id=\"acceptTerms\" value=\"accept\" />  <label for=\"acceptTerms\">Accept terms and conditions.</label></form>\n```\n\n```\ncy.get('form input').check(['subscribe', 'accept'])\n```\n",
      "section": "api",
      "anchors": [
        "values"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 52
    },
    {
      "id": "api/commands/check#check-the-checkboxes-with-the-values-subscribe-and-accept",
      "doc_id": "api/commands/check",
      "heading": "Check the checkboxes with the values 'subscribe' and 'accept'",
      "heading_level": 4,
      "content_markdown": "#### Check the checkboxes with the values 'subscribe' and 'accept'\n\n```\n<form>  <input type=\"checkbox\" id=\"subscribe\" value=\"subscribe\" />  <label for=\"subscribe\">Subscribe to newsletter?</label>  <input type=\"checkbox\" id=\"acceptTerms\" value=\"accept\" />  <label for=\"acceptTerms\">Accept terms and conditions.</label></form>\n```\n\n```\ncy.get('form input').check(['subscribe', 'accept'])\n```\n",
      "section": "api",
      "anchors": [
        "check-the-checkboxes-with-the-values-subscribe-and-accept"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 49
    },
    {
      "id": "api/commands/check#options",
      "doc_id": "api/commands/check",
      "heading": "Options",
      "heading_level": 3,
      "content_markdown": "### Options\n\n#### Check an invisible checkbox\n\nYou can ignore Cypress' default behavior of checking that the element is visible, clickable and not disabled by setting `force` to `true` in the options.\n\n```\ncy.get('.action-checkboxes')  .should('not.be.visible') // Passes  .check({ force: true })  .should('be.checked') // Passes\n```\n",
      "section": "api",
      "anchors": [
        "options"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 60
    },
    {
      "id": "api/commands/check#check-an-invisible-checkbox",
      "doc_id": "api/commands/check",
      "heading": "Check an invisible checkbox",
      "heading_level": 4,
      "content_markdown": "#### Check an invisible checkbox\n\nYou can ignore Cypress' default behavior of checking that the element is visible, clickable and not disabled by setting `force` to `true` in the options.\n\n```\ncy.get('.action-checkboxes')  .should('not.be.visible') // Passes  .check({ force: true })  .should('be.checked') // Passes\n```\n",
      "section": "api",
      "anchors": [
        "check-an-invisible-checkbox"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 57
    },
    {
      "id": "api/commands/check#find-checked-option",
      "doc_id": "api/commands/check",
      "heading": "Find checked option",
      "heading_level": 3,
      "content_markdown": "### Find checked option\n\nYou can get the currently checked option using the jQuery's [:checked selector](https://api.jquery.com/checked-selector/).\n\n```\n<form id=\"pick-fruit\">  <input type=\"radio\" name=\"fruit\" value=\"orange\" id=\"orange\" />  <input type=\"radio\" name=\"fruit\" value=\"apple\" id=\"apple\" checked=\"checked\" />  <input type=\"radio\" name=\"fruit\" value=\"banana\" id=\"banana\" /></form>\n```\n\n```\ncy.get('#pick-fruit :checked').should('be.checked').and('have.value', 'apple')\n```\n",
      "section": "api",
      "anchors": [
        "find-checked-option"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 59
    },
    {
      "id": "api/commands/check#rules",
      "doc_id": "api/commands/check",
      "heading": "Rules",
      "heading_level": 2,
      "content_markdown": "## Rules\n\n### Requirements [Learn about chaining commands](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Chains-of-Commands)\n\n*   `.check()` requires being chained off a command that yields DOM element(s).\n*   `.check()` requires the element to have type `checkbox` or `radio`.\n\n### Assertions [Learn about assertions](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Assertions)\n\n*   `.check()` will automatically wait for the element to reach an [actionable state](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n*   `.check()` will automatically [retry](/llm/markdown/app/core-concepts/retry-ability.md) until all chained assertions have passed.\n\n### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)\n\n*   `.check()` can time out waiting for the element to reach an [actionable state](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n*   `.check()` can time out waiting for assertions you've added to pass.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 121
    },
    {
      "id": "api/commands/check#timeouts-learn-about-timeouts",
      "doc_id": "api/commands/check",
      "heading": "Timeouts Learn about timeouts",
      "heading_level": 3,
      "content_markdown": "### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)\n\n*   `.check()` can time out waiting for the element to reach an [actionable state](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n*   `.check()` can time out waiting for assertions you've added to pass.\n",
      "section": "api",
      "anchors": [
        "timeouts-learn-about-timeouts"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 41
    },
    {
      "id": "api/commands/check#command-log",
      "doc_id": "api/commands/check",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**_check the element with name of 'emailUser'_**\n\n```\ncy.get('form').find('[name=\"emailUser\"]').check()\n```\n\nThe commands above will display in the Command Log as:\n\nWhen clicking on `check` within the command log, the console outputs the following:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/check.json",
      "token_estimate": 48
    }
  ]
}