{
  "doc": {
    "id": "api/commands/uncheck",
    "title": "cy.uncheck()",
    "description": "Uncheck checkbox(es) in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/uncheck.md",
    "version": "c4ad6f88c531de58221c73dd91a75af7138334b8",
    "updated_at": "2026-11-10T01:15:02.829Z",
    "headings": [
      {
        "id": "api/commands/uncheck#uncheck",
        "text": "uncheck",
        "level": 1
      },
      {
        "id": "api/commands/uncheck#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/uncheck#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#yields",
        "text": "Yields",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/uncheck#no-args",
        "text": "No Args",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#uncheck-all-checkboxes",
        "text": "Uncheck all checkboxes",
        "level": 4
      },
      {
        "id": "api/commands/uncheck#uncheck-element-with-the-id-saveusername",
        "text": "Uncheck element with the id 'saveUserName'",
        "level": 4
      },
      {
        "id": "api/commands/uncheck#value",
        "text": "Value",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#uncheck-the-checkbox-with-the-value-of-ga",
        "text": "Uncheck the checkbox with the value of 'ga'",
        "level": 4
      },
      {
        "id": "api/commands/uncheck#values",
        "text": "Values",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#uncheck-the-checkboxes-with-the-values-ga-and-ca",
        "text": "Uncheck the checkboxes with the values 'ga' and 'ca'",
        "level": 4
      },
      {
        "id": "api/commands/uncheck#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/uncheck#actionability",
        "text": "Actionability",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#the-element-must-first-reach-actionability",
        "text": "The element must first reach actionability",
        "level": 4
      },
      {
        "id": "api/commands/uncheck#value-matching",
        "text": "Value matching",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#a-value-argument-filters-the-subject",
        "text": "A value argument filters the subject",
        "level": 4
      },
      {
        "id": "api/commands/uncheck#checked-state",
        "text": "Checked state",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#unchecking-an-element-that-is-already-unchecked-does-nothing",
        "text": "Unchecking an element that is already unchecked does nothing",
        "level": 4
      },
      {
        "id": "api/commands/uncheck#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/uncheck#requirements",
        "text": "Requirements",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#assertions",
        "text": "Assertions",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#timeouts",
        "text": "Timeouts",
        "level": 3
      },
      {
        "id": "api/commands/uncheck#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/uncheck#history",
        "text": "History",
        "level": 2
      },
      {
        "id": "api/commands/uncheck#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/uncheck#syntax",
      "doc_id": "api/commands/uncheck",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.uncheck()\n.uncheck(value)\n.uncheck(values)\n.uncheck(options)\n.uncheck(value, options)\n.uncheck(values, options)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('[type=\"checkbox\"]').uncheck() // Unchecks checkbox element\n```\n\n**Incorrect Usage**\n\n```\ncy.uncheck('[type=\"checkbox\"]') // Errors, cannot be chained off 'cy'\ncy.get('p:first').uncheck() // Errors, '.get()' does not yield checkbox\ncy.get('[type=\"radio\"]').uncheck() // Errors, '.uncheck()' only accepts checkboxes\n```\n\n### Arguments\n\n**value _(String)_**\n\nValue of checkbox that should be unchecked.\n\n**values _(Array)_**\n\nValues of checkboxes that should be unchecked.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.uncheck()`.\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| `force` | `false` | Forces the action, disables [waiting for actionability](#Assertions) |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\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. Accepts a single alignment, a per-axis `{ block, inline }` object, or `false`. |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.uncheck()` 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\n\n*   `.uncheck()` yields the same subject it was given.\n*   Passing a `value` or `values` narrows the yielded subject to the matching elements.\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 `.uncheck()`.\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 333
    },
    {
      "id": "api/commands/uncheck#usage",
      "doc_id": "api/commands/uncheck",
      "heading": "Usage",
      "heading_level": 3,
      "content_markdown": "### Usage\n\n**Correct Usage**\n\n```\ncy.get('[type=\"checkbox\"]').uncheck() // Unchecks checkbox element\n```\n\n**Incorrect Usage**\n\n```\ncy.uncheck('[type=\"checkbox\"]') // Errors, cannot be chained off 'cy'\ncy.get('p:first').uncheck() // Errors, '.get()' does not yield checkbox\ncy.get('[type=\"radio\"]').uncheck() // Errors, '.uncheck()' only accepts checkboxes\n```\n",
      "section": "api",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 51
    },
    {
      "id": "api/commands/uncheck#arguments",
      "doc_id": "api/commands/uncheck",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**value _(String)_**\n\nValue of checkbox that should be unchecked.\n\n**values _(Array)_**\n\nValues of checkboxes that should be unchecked.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.uncheck()`.\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| `force` | `false` | Forces the action, disables [waiting for actionability](#Assertions) |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\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. Accepts a single alignment, a per-axis `{ block, inline }` object, or `false`. |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.uncheck()` 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/uncheck.json",
      "token_estimate": 213
    },
    {
      "id": "api/commands/uncheck#yields",
      "doc_id": "api/commands/uncheck",
      "heading": "Yields",
      "heading_level": 3,
      "content_markdown": "### Yields\n\n*   `.uncheck()` yields the same subject it was given.\n*   Passing a `value` or `values` narrows the yielded subject to the matching elements.\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 `.uncheck()`.\n",
      "section": "api",
      "anchors": [
        "yields"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 53
    },
    {
      "id": "api/commands/uncheck#examples",
      "doc_id": "api/commands/uncheck",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### No Args\n\n#### Uncheck all checkboxes\n\n```\ncy.get(':checkbox').uncheck()\n```\n\n#### Uncheck element with the id 'saveUserName'\n\n```\ncy.get('#saveUserName').uncheck()\n```\n\n### Value\n\n#### Uncheck the checkbox with the value of 'ga'\n\n```\ncy.get('input[type=\"checkbox\"]').uncheck('ga')\n```\n\n### Values\n\n#### Uncheck the checkboxes with the values 'ga' and 'ca'\n\n```\ncy.get('[type=\"checkbox\"]').uncheck(['ga', 'ca'])\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 69
    },
    {
      "id": "api/commands/uncheck#notes",
      "doc_id": "api/commands/uncheck",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n### Actionability\n\n#### The element must first reach actionability\n\n`.uncheck()` is an \"action command\" that follows all the rules of [Actionability](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n\n### Value matching\n\n#### A value argument filters the subject\n\n`.uncheck()` compares each argument against the element's `value` and acts only on the elements that match, yielding that narrowed set. Elements that don't match are left untouched, and a value that matches nothing is dropped without an error.\n\n```\n// If no checkbox has the value 'tx', this unchecks and yields only 'ga'\ncy.get('[type=\"checkbox\"]').uncheck(['ga', 'tx'])\n```\n\nA checkbox with no `value` attribute reports a value of `on`, so passing `'on'` to such an element fails with an error rather than unchecking it.\n\n### Checked state\n\n#### Unchecking an element that is already unchecked does nothing\n\n`.uncheck()` skips the click when the element is already unchecked, so no `change` event fires and the console output notes that no operation took place. The element still has to be visible unless you pass `force: true`.\n\nA checkbox in an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate) state leaves that state when you uncheck it, whether or not the click happens.\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 245
    },
    {
      "id": "api/commands/uncheck#value-matching",
      "doc_id": "api/commands/uncheck",
      "heading": "Value matching",
      "heading_level": 3,
      "content_markdown": "### Value matching\n\n#### A value argument filters the subject\n\n`.uncheck()` compares each argument against the element's `value` and acts only on the elements that match, yielding that narrowed set. Elements that don't match are left untouched, and a value that matches nothing is dropped without an error.\n\n```\n// If no checkbox has the value 'tx', this unchecks and yields only 'ga'\ncy.get('[type=\"checkbox\"]').uncheck(['ga', 'tx'])\n```\n\nA checkbox with no `value` attribute reports a value of `on`, so passing `'on'` to such an element fails with an error rather than unchecking it.\n",
      "section": "api",
      "anchors": [
        "value-matching"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 123
    },
    {
      "id": "api/commands/uncheck#a-value-argument-filters-the-subject",
      "doc_id": "api/commands/uncheck",
      "heading": "A value argument filters the subject",
      "heading_level": 4,
      "content_markdown": "#### A value argument filters the subject\n\n`.uncheck()` compares each argument against the element's `value` and acts only on the elements that match, yielding that narrowed set. Elements that don't match are left untouched, and a value that matches nothing is dropped without an error.\n\n```\n// If no checkbox has the value 'tx', this unchecks and yields only 'ga'\ncy.get('[type=\"checkbox\"]').uncheck(['ga', 'tx'])\n```\n\nA checkbox with no `value` attribute reports a value of `on`, so passing `'on'` to such an element fails with an error rather than unchecking it.\n",
      "section": "api",
      "anchors": [
        "a-value-argument-filters-the-subject"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 119
    },
    {
      "id": "api/commands/uncheck#checked-state",
      "doc_id": "api/commands/uncheck",
      "heading": "Checked state",
      "heading_level": 3,
      "content_markdown": "### Checked state\n\n#### Unchecking an element that is already unchecked does nothing\n\n`.uncheck()` skips the click when the element is already unchecked, so no `change` event fires and the console output notes that no operation took place. The element still has to be visible unless you pass `force: true`.\n\nA checkbox in an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate) state leaves that state when you uncheck it, whether or not the click happens.\n",
      "section": "api",
      "anchors": [
        "checked-state"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 92
    },
    {
      "id": "api/commands/uncheck#unchecking-an-element-that-is-already-unchecked-does-nothing",
      "doc_id": "api/commands/uncheck",
      "heading": "Unchecking an element that is already unchecked does nothing",
      "heading_level": 4,
      "content_markdown": "#### Unchecking an element that is already unchecked does nothing\n\n`.uncheck()` skips the click when the element is already unchecked, so no `change` event fires and the console output notes that no operation took place. The element still has to be visible unless you pass `force: true`.\n\nA checkbox in an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate) state leaves that state when you uncheck it, whether or not the click happens.\n",
      "section": "api",
      "anchors": [
        "unchecking-an-element-that-is-already-unchecked-does-nothing"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 88
    },
    {
      "id": "api/commands/uncheck#rules",
      "doc_id": "api/commands/uncheck",
      "heading": "Rules",
      "heading_level": 2,
      "content_markdown": "## Rules\n\n### Requirements\n\n*   `.uncheck()` requires being chained off a command that yields DOM element(s).\n*   `.uncheck()` requires the element to have type `checkbox`.\n\n### Assertions\n\n*   `.uncheck()` will automatically wait for the element to reach an [actionable state](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n*   `.uncheck()` will automatically [retry](/llm/markdown/app/core-concepts/retry-ability.md) until all chained assertions have passed.\n\n### Timeouts\n\n*   `.uncheck()` can time out waiting for the element to reach an [actionable state](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n*   `.uncheck()` can time out waiting for assertions you've added to pass.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 105
    },
    {
      "id": "api/commands/uncheck#command-log",
      "doc_id": "api/commands/uncheck",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**_Uncheck the first checkbox_**\n\n```\ncy.get('[data-js=\"choose-all\"]')\n  .click()\n  .find('input[type=\"checkbox\"]')\n  .first()\n  .uncheck()\n```\n\nThe commands above will display in the Command Log as:\n\nWhen clicking on `uncheck` within the command log, the console outputs the following:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 49
    },
    {
      "id": "api/commands/uncheck#history",
      "doc_id": "api/commands/uncheck",
      "heading": "History",
      "heading_level": 2,
      "content_markdown": "## History\n\n| Version | Changes |\n| --- | --- |\n| [15.20.0](/llm/markdown/app/references/changelog.md#15-20-0) | Option `scrollBehavior` now accepts a per-axis `{ block, inline }` object and the `'start'` and `'end'` alignments |\n| [10.0.1](/llm/markdown/app/references/changelog.md#10-0-1) | `.uncheck()` removes the `indeterminate` state from a checkbox |\n| [8.4.0](/llm/markdown/app/references/changelog.md#8-4-0) | Clearer error when a value is passed and the element has no `value` attribute |\n| [6.1.0](/llm/markdown/app/references/changelog.md#6-1-0) | Added option `scrollBehavior` |\n| [0.14.0](/llm/markdown/app/references/changelog.md#0-14-0) | `.uncheck()` narrows the yielded subject to the elements matching the passed value |\n| [0.6.12](/llm/markdown/app/references/changelog.md#0-6-12) | Added option `force` |\n| [0.3.3](/llm/markdown/app/references/changelog.md#0-3-3) | `.uncheck()` command added |\n",
      "section": "api",
      "anchors": [
        "history"
      ],
      "path": "/llm/json/chunked/api/commands/uncheck.json",
      "token_estimate": 133
    }
  ]
}