{
  "doc": {
    "id": "api/commands/dblclick",
    "title": "cy.dblclick()",
    "description": "Double-click a DOM element in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/dblclick.md",
    "version": "5a232a3cf094b8f928b1179ce5af6a5046296fac",
    "updated_at": "2026-11-13T01:14:31.437Z",
    "headings": [
      {
        "id": "api/commands/dblclick#dblclick",
        "text": "dblclick",
        "level": 1
      },
      {
        "id": "api/commands/dblclick#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/dblclick#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#yields",
        "text": "Yields",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/dblclick#no-args",
        "text": "No Args",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#double-click-an-anchor-link-in-the-navigation",
        "text": "Double-click an anchor link in the navigation",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#double-click-a-label-to-edit-an-item-inline",
        "text": "Double-click a label to edit an item inline",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#double-click-one-element-out-of-several-matches",
        "text": "Double-click one element out of several matches",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#wait-for-the-request-a-double-click-sends",
        "text": "Wait for the request a double-click sends",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#test-an-element-that-handles-both-click-and-double-click",
        "text": "Test an element that handles both click and double-click",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#position",
        "text": "Position",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#specify-a-position-of-the-element-to-double-click",
        "text": "Specify a position of the element to double-click",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#coordinates",
        "text": "Coordinates",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#specify-coordinates-relative-to-the-top-left-corner",
        "text": "Specify coordinates relative to the top-left corner",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#double-click-a-precise-spot-on-a-map-or-canvas",
        "text": "Double-click a precise spot on a map or canvas",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#options",
        "text": "Options",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#force-a-double-click-regardless-of-its-actionable-state",
        "text": "Force a double-click regardless of its actionable state",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#force-a-double-click-with-a-position-argument",
        "text": "Force a double-click with a position argument",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#force-a-double-click-with-relative-coordinates",
        "text": "Force a double-click with relative coordinates",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#double-click-every-element-that-matches-a-selector",
        "text": "Double-click every element that matches a selector",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#double-click-with-key-combinations",
        "text": "Double-click with key combinations",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#alt-double-click-the-first-list-item",
        "text": "Alt + double-click the first list item",
        "level": 5
      },
      {
        "id": "api/commands/dblclick#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/dblclick#actionability",
        "text": "Actionability",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#the-element-must-first-reach-actionability",
        "text": "The element must first reach actionability",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#events",
        "text": "Events",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#a-double-click-fires-two-clicks-then-a-dblclick",
        "text": "A double-click fires two clicks, then a dblclick",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#text-selection",
        "text": "Text selection",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#a-double-click-does-not-select-the-word-you-double-click",
        "text": "A double-click does not select the word you double-click",
        "level": 4
      },
      {
        "id": "api/commands/dblclick#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/dblclick#requirements",
        "text": "Requirements",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#assertions",
        "text": "Assertions",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#timeouts",
        "text": "Timeouts",
        "level": 3
      },
      {
        "id": "api/commands/dblclick#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/dblclick#history",
        "text": "History",
        "level": 2
      },
      {
        "id": "api/commands/dblclick#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/dblclick#syntax",
      "doc_id": "api/commands/dblclick",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.dblclick()\n.dblclick(options)\n.dblclick(position)\n.dblclick(position, options)\n.dblclick(x, y)\n.dblclick(x, y, options)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('button').dblclick() // Double-click on button\ncy.focused().dblclick() // Double-click on element with focus\ncy.contains('Welcome').dblclick() // Double-click on first element containing 'Welcome'\n```\n\n**Incorrect Usage**\n\n```\ncy.dblclick('button') // Errors, cannot be chained off 'cy'\ncy.window().dblclick() // Errors, 'window' does not yield DOM element\n```\n\n### Arguments\n\n**position _(String)_**\n\nThe position where Cypress issues the double-click. The `center` position is the default position. Valid positions are `topLeft`, `top`, `topRight`, `left`, `center`, `right`, `bottomLeft`, `bottom`, and `bottomRight`.\n\n**x _(Number)_**\n\nThe distance in pixels from the element's left to issue the double-click.\n\n**y _(Number)_**\n\nThe distance in pixels from the element's top to issue the double-click.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.dblclick()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `altKey` | `false` | Activates the alt key (option key for Mac). Aliases: `optionKey`. |\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| `ctrlKey` | `false` | Activates the control key. Aliases: `controlKey`. |\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| `metaKey` | `false` | Activates the meta key (Windows key or command key for Mac). Aliases: `commandKey`, `cmdKey`. |\n| `multiple` | `true` | Serially double-click multiple elements |\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| `shiftKey` | `false` | Activates the shift key. |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.dblclick()` 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*   `.dblclick()` 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 `.dblclick()`.\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 472
    },
    {
      "id": "api/commands/dblclick#usage",
      "doc_id": "api/commands/dblclick",
      "heading": "Usage",
      "heading_level": 3,
      "content_markdown": "### Usage\n\n**Correct Usage**\n\n```\ncy.get('button').dblclick() // Double-click on button\ncy.focused().dblclick() // Double-click on element with focus\ncy.contains('Welcome').dblclick() // Double-click on first element containing 'Welcome'\n```\n\n**Incorrect Usage**\n\n```\ncy.dblclick('button') // Errors, cannot be chained off 'cy'\ncy.window().dblclick() // Errors, 'window' does not yield DOM element\n```\n",
      "section": "api",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 63
    },
    {
      "id": "api/commands/dblclick#arguments",
      "doc_id": "api/commands/dblclick",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**position _(String)_**\n\nThe position where Cypress issues the double-click. The `center` position is the default position. Valid positions are `topLeft`, `top`, `topRight`, `left`, `center`, `right`, `bottomLeft`, `bottom`, and `bottomRight`.\n\n**x _(Number)_**\n\nThe distance in pixels from the element's left to issue the double-click.\n\n**y _(Number)_**\n\nThe distance in pixels from the element's top to issue the double-click.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.dblclick()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `altKey` | `false` | Activates the alt key (option key for Mac). Aliases: `optionKey`. |\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| `ctrlKey` | `false` | Activates the control key. Aliases: `controlKey`. |\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| `metaKey` | `false` | Activates the meta key (Windows key or command key for Mac). Aliases: `commandKey`, `cmdKey`. |\n| `multiple` | `true` | Serially double-click multiple elements |\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| `shiftKey` | `false` | Activates the shift key. |\n| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.dblclick()` 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/dblclick.json",
      "token_estimate": 356
    },
    {
      "id": "api/commands/dblclick#examples",
      "doc_id": "api/commands/dblclick",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### No Args\n\n#### Double-click an anchor link in the navigation\n\n```\ncy.get('a#nav1').dblclick() // yields the <a>\n```\n\n#### Double-click a label to edit an item inline\n\nMany apps turn a label, table cell, or file name into an input when you double-click it. The double-click usually replaces the element, so start a new chain from `cy` to reach the input instead of chaining off `.dblclick()`.\n\n```\ncy.get('[data-cy=todo-label]').first().dblclick()\ncy.get('[data-cy=todo-edit]').clear().type('Buy oat milk{enter}')\ncy.get('[data-cy=todo-label]').first().should('have.text', 'Buy oat milk')\n```\n\n#### Double-click one element out of several matches\n\n`.dblclick()` double-clicks [every element in its subject](#Double-click-every-element-that-matches-a-selector) by default, so a selector that matches several rows puts all of them into edit mode without an error. Narrow the query to the element you want with [`.eq()`](/llm/markdown/api/commands/eq.md), [`.first()`](/llm/markdown/api/commands/first.md), or [`cy.contains()`](/llm/markdown/api/commands/contains.md) with a selector and text.\n\n```\ncy.get('[data-cy=row]').eq(2).dblclick()\ncy.contains('[data-cy=file]', 'report.pdf').dblclick()\n```\n\n#### Wait for the request a double-click sends\n\nRegister a [`cy.intercept()`](/llm/markdown/api/commands/intercept.md) before the double-click, then [`cy.wait()`](/llm/markdown/api/commands/wait.md) on its alias so the test continues only after the request completes.\n\n```\ncy.intercept('GET', '/api/files/*').as('openFile')\ncy.contains('[data-cy=file]', 'report.pdf').dblclick()\ncy.wait('@openFile')\ncy.get('[data-cy=preview]').should('be.visible')\n```\n\n#### Test an element that handles both click and double-click\n\nCypress sends two `click` events before the `dblclick` event (see [Events](#Events)), so a click handler runs twice. Apps that respond to both often wait briefly after a click to see whether a second one follows. If yours uses a timer like that, freeze it with [`cy.clock()`](/llm/markdown/api/commands/clock.md), then advance it past your app's delay with [`cy.tick()`](/llm/markdown/api/commands/tick.md). The example below assumes a delay under 300 milliseconds. Without the tick, the `not.have.class` assertion passes before the timer fires, so it can't catch a single-click action that runs by mistake.\n\n```\ncy.clock()\ncy.get('[data-cy=photo]').dblclick()\ncy.tick(300)\ncy.get('[data-cy=lightbox]').should('be.visible')\ncy.get('[data-cy=photo]').should('not.have.class', 'selected')\n```\n\n### Position\n\n#### Specify a position of the element to double-click\n\nDouble-click the bottom center of the button.\n\n```\ncy.get('button').dblclick('bottom')\n```\n\n### Coordinates\n\n#### Specify coordinates relative to the top-left corner\n\nCypress issues the double-click below inside of the element (30px from the left and 10px from the top).\n\n```\ncy.get('button').dblclick(30, 10)\n```\n\n#### Double-click a precise spot on a map or canvas\n\nCoordinates matter when the double-click position changes the result, such as zooming a map in on the point under the cursor.\n\n```\ncy.get('[data-cy=map]').dblclick(200, 150)\ncy.get('[data-cy=zoom-level]').should('have.text', '4')\n```\n\n### Options\n\n#### Force a double-click regardless of its actionable state\n\nForcing a double-click overrides the [actionable checks](/llm/markdown/app/core-concepts/interacting-with-elements.md#Forcing) Cypress applies and fires the events. On a disabled element, a forced double-click fires both click sequences but not the `dblclick` event, so a `dblclick` handler on a disabled element never runs.\n\n```\ncy.get('button').dblclick({ force: true })\n```\n\n#### Force a double-click with a position argument\n\n```\ncy.get('button').dblclick('topRight', { force: true })\n```\n\n#### Force a double-click with relative coordinates\n\n```\ncy.get('button').dblclick(60, 60, { force: true })\n```\n\n#### Double-click every element that matches a selector\n\nUnlike [`.click()`](/llm/markdown/api/commands/click.md), `.dblclick()` defaults to `{ multiple: true }`. When the subject contains several elements, Cypress double-clicks each one in turn, gives each double-click its own full timeout, and logs each one to the [Command Log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log).\n\n```\ncy.get('[data-cy=todo-label]').dblclick() // double-clicks every label\n```\n\nPass `{ multiple: false }` as a guard when a selector should match exactly one element. If it ever matches more, `.dblclick()` fails the test instead of double-clicking all of them.\n\n```\ncy.get('[data-cy=current-todo]').dblclick({ multiple: false })\n```\n\n#### Double-click with key combinations\n\nPass key modifiers to `.dblclick()` to hold down keys while it double-clicks, such as `ALT + double-click`.\n\nYou can also use key combinations during [`.type()`](/llm/markdown/api/commands/type.md), which can hold keys down across multiple commands. See [Key Combinations](/llm/markdown/api/commands/type.md#Key-Combinations).\n\nThe following keys can be combined with `.dblclick()` through the `options`.\n\n| Option | Notes |\n| --- | --- |\n| `altKey` | Activates the alt key (option key for Mac). Aliases: `optionKey`. |\n| `ctrlKey` | Activates the control key. Aliases: `controlKey`. |\n| `metaKey` | Activates the meta key (Windows key or command key for Mac). Aliases: `commandKey`, `cmdKey`. |\n| `shiftKey` | Activates the shift key. |\n\n##### Alt + double-click the first list item\n\n```\n// execute ALT + dblclick on the first <li>\ncy.get('li').first().dblclick({\n  altKey: true,\n})\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 899
    },
    {
      "id": "api/commands/dblclick#no-args",
      "doc_id": "api/commands/dblclick",
      "heading": "No Args",
      "heading_level": 3,
      "content_markdown": "### No Args\n\n#### Double-click an anchor link in the navigation\n\n```\ncy.get('a#nav1').dblclick() // yields the <a>\n```\n\n#### Double-click a label to edit an item inline\n\nMany apps turn a label, table cell, or file name into an input when you double-click it. The double-click usually replaces the element, so start a new chain from `cy` to reach the input instead of chaining off `.dblclick()`.\n\n```\ncy.get('[data-cy=todo-label]').first().dblclick()\ncy.get('[data-cy=todo-edit]').clear().type('Buy oat milk{enter}')\ncy.get('[data-cy=todo-label]').first().should('have.text', 'Buy oat milk')\n```\n\n#### Double-click one element out of several matches\n\n`.dblclick()` double-clicks [every element in its subject](#Double-click-every-element-that-matches-a-selector) by default, so a selector that matches several rows puts all of them into edit mode without an error. Narrow the query to the element you want with [`.eq()`](/llm/markdown/api/commands/eq.md), [`.first()`](/llm/markdown/api/commands/first.md), or [`cy.contains()`](/llm/markdown/api/commands/contains.md) with a selector and text.\n\n```\ncy.get('[data-cy=row]').eq(2).dblclick()\ncy.contains('[data-cy=file]', 'report.pdf').dblclick()\n```\n\n#### Wait for the request a double-click sends\n\nRegister a [`cy.intercept()`](/llm/markdown/api/commands/intercept.md) before the double-click, then [`cy.wait()`](/llm/markdown/api/commands/wait.md) on its alias so the test continues only after the request completes.\n\n```\ncy.intercept('GET', '/api/files/*').as('openFile')\ncy.contains('[data-cy=file]', 'report.pdf').dblclick()\ncy.wait('@openFile')\ncy.get('[data-cy=preview]').should('be.visible')\n```\n\n#### Test an element that handles both click and double-click\n\nCypress sends two `click` events before the `dblclick` event (see [Events](#Events)), so a click handler runs twice. Apps that respond to both often wait briefly after a click to see whether a second one follows. If yours uses a timer like that, freeze it with [`cy.clock()`](/llm/markdown/api/commands/clock.md), then advance it past your app's delay with [`cy.tick()`](/llm/markdown/api/commands/tick.md). The example below assumes a delay under 300 milliseconds. Without the tick, the `not.have.class` assertion passes before the timer fires, so it can't catch a single-click action that runs by mistake.\n\n```\ncy.clock()\ncy.get('[data-cy=photo]').dblclick()\ncy.tick(300)\ncy.get('[data-cy=lightbox]').should('be.visible')\ncy.get('[data-cy=photo]').should('not.have.class', 'selected')\n```\n",
      "section": "api",
      "anchors": [
        "no-args"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 364
    },
    {
      "id": "api/commands/dblclick#double-click-a-label-to-edit-an-item-inline",
      "doc_id": "api/commands/dblclick",
      "heading": "Double-click a label to edit an item inline",
      "heading_level": 4,
      "content_markdown": "#### Double-click a label to edit an item inline\n\nMany apps turn a label, table cell, or file name into an input when you double-click it. The double-click usually replaces the element, so start a new chain from `cy` to reach the input instead of chaining off `.dblclick()`.\n\n```\ncy.get('[data-cy=todo-label]').first().dblclick()\ncy.get('[data-cy=todo-edit]').clear().type('Buy oat milk{enter}')\ncy.get('[data-cy=todo-label]').first().should('have.text', 'Buy oat milk')\n```\n",
      "section": "api",
      "anchors": [
        "double-click-a-label-to-edit-an-item-inline"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 77
    },
    {
      "id": "api/commands/dblclick#double-click-one-element-out-of-several-matches",
      "doc_id": "api/commands/dblclick",
      "heading": "Double-click one element out of several matches",
      "heading_level": 4,
      "content_markdown": "#### Double-click one element out of several matches\n\n`.dblclick()` double-clicks [every element in its subject](#Double-click-every-element-that-matches-a-selector) by default, so a selector that matches several rows puts all of them into edit mode without an error. Narrow the query to the element you want with [`.eq()`](/llm/markdown/api/commands/eq.md), [`.first()`](/llm/markdown/api/commands/first.md), or [`cy.contains()`](/llm/markdown/api/commands/contains.md) with a selector and text.\n\n```\ncy.get('[data-cy=row]').eq(2).dblclick()\ncy.contains('[data-cy=file]', 'report.pdf').dblclick()\n```\n",
      "section": "api",
      "anchors": [
        "double-click-one-element-out-of-several-matches"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 76
    },
    {
      "id": "api/commands/dblclick#wait-for-the-request-a-double-click-sends",
      "doc_id": "api/commands/dblclick",
      "heading": "Wait for the request a double-click sends",
      "heading_level": 4,
      "content_markdown": "#### Wait for the request a double-click sends\n\nRegister a [`cy.intercept()`](/llm/markdown/api/commands/intercept.md) before the double-click, then [`cy.wait()`](/llm/markdown/api/commands/wait.md) on its alias so the test continues only after the request completes.\n\n```\ncy.intercept('GET', '/api/files/*').as('openFile')\ncy.contains('[data-cy=file]', 'report.pdf').dblclick()\ncy.wait('@openFile')\ncy.get('[data-cy=preview]').should('be.visible')\n```\n",
      "section": "api",
      "anchors": [
        "wait-for-the-request-a-double-click-sends"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 48
    },
    {
      "id": "api/commands/dblclick#test-an-element-that-handles-both-click-and-double-click",
      "doc_id": "api/commands/dblclick",
      "heading": "Test an element that handles both click and double-click",
      "heading_level": 4,
      "content_markdown": "#### Test an element that handles both click and double-click\n\nCypress sends two `click` events before the `dblclick` event (see [Events](#Events)), so a click handler runs twice. Apps that respond to both often wait briefly after a click to see whether a second one follows. If yours uses a timer like that, freeze it with [`cy.clock()`](/llm/markdown/api/commands/clock.md), then advance it past your app's delay with [`cy.tick()`](/llm/markdown/api/commands/tick.md). The example below assumes a delay under 300 milliseconds. Without the tick, the `not.have.class` assertion passes before the timer fires, so it can't catch a single-click action that runs by mistake.\n\n```\ncy.clock()\ncy.get('[data-cy=photo]').dblclick()\ncy.tick(300)\ncy.get('[data-cy=lightbox]').should('be.visible')\ncy.get('[data-cy=photo]').should('not.have.class', 'selected')\n```\n",
      "section": "api",
      "anchors": [
        "test-an-element-that-handles-both-click-and-double-click"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 139
    },
    {
      "id": "api/commands/dblclick#coordinates",
      "doc_id": "api/commands/dblclick",
      "heading": "Coordinates",
      "heading_level": 3,
      "content_markdown": "### Coordinates\n\n#### Specify coordinates relative to the top-left corner\n\nCypress issues the double-click below inside of the element (30px from the left and 10px from the top).\n\n```\ncy.get('button').dblclick(30, 10)\n```\n\n#### Double-click a precise spot on a map or canvas\n\nCoordinates matter when the double-click position changes the result, such as zooming a map in on the point under the cursor.\n\n```\ncy.get('[data-cy=map]').dblclick(200, 150)\ncy.get('[data-cy=zoom-level]').should('have.text', '4')\n```\n",
      "section": "api",
      "anchors": [
        "coordinates"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 92
    },
    {
      "id": "api/commands/dblclick#specify-coordinates-relative-to-the-top-left-corner",
      "doc_id": "api/commands/dblclick",
      "heading": "Specify coordinates relative to the top-left corner",
      "heading_level": 4,
      "content_markdown": "#### Specify coordinates relative to the top-left corner\n\nCypress issues the double-click below inside of the element (30px from the left and 10px from the top).\n\n```\ncy.get('button').dblclick(30, 10)\n```\n",
      "section": "api",
      "anchors": [
        "specify-coordinates-relative-to-the-top-left-corner"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 40
    },
    {
      "id": "api/commands/dblclick#double-click-a-precise-spot-on-a-map-or-canvas",
      "doc_id": "api/commands/dblclick",
      "heading": "Double-click a precise spot on a map or canvas",
      "heading_level": 4,
      "content_markdown": "#### Double-click a precise spot on a map or canvas\n\nCoordinates matter when the double-click position changes the result, such as zooming a map in on the point under the cursor.\n\n```\ncy.get('[data-cy=map]').dblclick(200, 150)\ncy.get('[data-cy=zoom-level]').should('have.text', '4')\n```\n",
      "section": "api",
      "anchors": [
        "double-click-a-precise-spot-on-a-map-or-canvas"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 49
    },
    {
      "id": "api/commands/dblclick#options",
      "doc_id": "api/commands/dblclick",
      "heading": "Options",
      "heading_level": 3,
      "content_markdown": "### Options\n\n#### Force a double-click regardless of its actionable state\n\nForcing a double-click overrides the [actionable checks](/llm/markdown/app/core-concepts/interacting-with-elements.md#Forcing) Cypress applies and fires the events. On a disabled element, a forced double-click fires both click sequences but not the `dblclick` event, so a `dblclick` handler on a disabled element never runs.\n\n```\ncy.get('button').dblclick({ force: true })\n```\n\n#### Force a double-click with a position argument\n\n```\ncy.get('button').dblclick('topRight', { force: true })\n```\n\n#### Force a double-click with relative coordinates\n\n```\ncy.get('button').dblclick(60, 60, { force: true })\n```\n\n#### Double-click every element that matches a selector\n\nUnlike [`.click()`](/llm/markdown/api/commands/click.md), `.dblclick()` defaults to `{ multiple: true }`. When the subject contains several elements, Cypress double-clicks each one in turn, gives each double-click its own full timeout, and logs each one to the [Command Log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log).\n\n```\ncy.get('[data-cy=todo-label]').dblclick() // double-clicks every label\n```\n\nPass `{ multiple: false }` as a guard when a selector should match exactly one element. If it ever matches more, `.dblclick()` fails the test instead of double-clicking all of them.\n\n```\ncy.get('[data-cy=current-todo]').dblclick({ multiple: false })\n```\n\n#### Double-click with key combinations\n\nPass key modifiers to `.dblclick()` to hold down keys while it double-clicks, such as `ALT + double-click`.\n\nYou can also use key combinations during [`.type()`](/llm/markdown/api/commands/type.md), which can hold keys down across multiple commands. See [Key Combinations](/llm/markdown/api/commands/type.md#Key-Combinations).\n\nThe following keys can be combined with `.dblclick()` through the `options`.\n\n| Option | Notes |\n| --- | --- |\n| `altKey` | Activates the alt key (option key for Mac). Aliases: `optionKey`. |\n| `ctrlKey` | Activates the control key. Aliases: `controlKey`. |\n| `metaKey` | Activates the meta key (Windows key or command key for Mac). Aliases: `commandKey`, `cmdKey`. |\n| `shiftKey` | Activates the shift key. |\n\n##### Alt + double-click the first list item\n\n```\n// execute ALT + dblclick on the first <li>\ncy.get('li').first().dblclick({\n  altKey: true,\n})\n```\n",
      "section": "api",
      "anchors": [
        "options"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 412
    },
    {
      "id": "api/commands/dblclick#force-a-double-click-regardless-of-its-actionable-state",
      "doc_id": "api/commands/dblclick",
      "heading": "Force a double-click regardless of its actionable state",
      "heading_level": 4,
      "content_markdown": "#### Force a double-click regardless of its actionable state\n\nForcing a double-click overrides the [actionable checks](/llm/markdown/app/core-concepts/interacting-with-elements.md#Forcing) Cypress applies and fires the events. On a disabled element, a forced double-click fires both click sequences but not the `dblclick` event, so a `dblclick` handler on a disabled element never runs.\n\n```\ncy.get('button').dblclick({ force: true })\n```\n",
      "section": "api",
      "anchors": [
        "force-a-double-click-regardless-of-its-actionable-state"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 72
    },
    {
      "id": "api/commands/dblclick#double-click-every-element-that-matches-a-selector",
      "doc_id": "api/commands/dblclick",
      "heading": "Double-click every element that matches a selector",
      "heading_level": 4,
      "content_markdown": "#### Double-click every element that matches a selector\n\nUnlike [`.click()`](/llm/markdown/api/commands/click.md), `.dblclick()` defaults to `{ multiple: true }`. When the subject contains several elements, Cypress double-clicks each one in turn, gives each double-click its own full timeout, and logs each one to the [Command Log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log).\n\n```\ncy.get('[data-cy=todo-label]').dblclick() // double-clicks every label\n```\n\nPass `{ multiple: false }` as a guard when a selector should match exactly one element. If it ever matches more, `.dblclick()` fails the test instead of double-clicking all of them.\n\n```\ncy.get('[data-cy=current-todo]').dblclick({ multiple: false })\n```\n",
      "section": "api",
      "anchors": [
        "double-click-every-element-that-matches-a-selector"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 117
    },
    {
      "id": "api/commands/dblclick#double-click-with-key-combinations",
      "doc_id": "api/commands/dblclick",
      "heading": "Double-click with key combinations",
      "heading_level": 4,
      "content_markdown": "#### Double-click with key combinations\n\nPass key modifiers to `.dblclick()` to hold down keys while it double-clicks, such as `ALT + double-click`.\n\nYou can also use key combinations during [`.type()`](/llm/markdown/api/commands/type.md), which can hold keys down across multiple commands. See [Key Combinations](/llm/markdown/api/commands/type.md#Key-Combinations).\n\nThe following keys can be combined with `.dblclick()` through the `options`.\n\n| Option | Notes |\n| --- | --- |\n| `altKey` | Activates the alt key (option key for Mac). Aliases: `optionKey`. |\n| `ctrlKey` | Activates the control key. Aliases: `controlKey`. |\n| `metaKey` | Activates the meta key (Windows key or command key for Mac). Aliases: `commandKey`, `cmdKey`. |\n| `shiftKey` | Activates the shift key. |\n\n##### Alt + double-click the first list item\n\n```\n// execute ALT + dblclick on the first <li>\ncy.get('li').first().dblclick({\n  altKey: true,\n})\n```\n",
      "section": "api",
      "anchors": [
        "double-click-with-key-combinations"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 180
    },
    {
      "id": "api/commands/dblclick#notes",
      "doc_id": "api/commands/dblclick",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n### Actionability\n\n#### The element must first reach actionability\n\n`.dblclick()` is an \"action command\" that follows all the rules of [Actionability](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n\n### Events\n\n#### A double-click fires two clicks, then a dblclick\n\nCypress fires the full [`.click()`](/llm/markdown/api/commands/click.md) event sequence twice, then a `dblclick` event, matching what a browser sends for a real double-click. The mouse events in the first click have a `detail` of `1`. The mouse events in the second click, and the `dblclick` event, have a `detail` of `2`. The `pointerdown` and `pointerup` events have a `detail` of `0`.\n\nBecause each click follows the `.click()` rules, the [focus](/llm/markdown/api/commands/click.md#Focus) and [cancellation](/llm/markdown/api/commands/click.md#Cancellation) behavior of `.click()` applies to both clicks.\n\n### Text selection\n\n#### A double-click does not select the word you double-click\n\nIn a browser, double-clicking a word selects it. Cypress fires the double-click as simulated events, which don't trigger the browser's native text selection. `.dblclick()` doesn't select the word you double-click, in page text or in an input, and it leaves any text that was already selected in place. To select the text in an input or textarea, use [`.type('{selectall}')`](/llm/markdown/api/commands/type.md).\n\n```\ncy.get('[data-cy=title]').type('{selectall}')\n```\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 248
    },
    {
      "id": "api/commands/dblclick#events",
      "doc_id": "api/commands/dblclick",
      "heading": "Events",
      "heading_level": 3,
      "content_markdown": "### Events\n\n#### A double-click fires two clicks, then a dblclick\n\nCypress fires the full [`.click()`](/llm/markdown/api/commands/click.md) event sequence twice, then a `dblclick` event, matching what a browser sends for a real double-click. The mouse events in the first click have a `detail` of `1`. The mouse events in the second click, and the `dblclick` event, have a `detail` of `2`. The `pointerdown` and `pointerup` events have a `detail` of `0`.\n\nBecause each click follows the `.click()` rules, the [focus](/llm/markdown/api/commands/click.md#Focus) and [cancellation](/llm/markdown/api/commands/click.md#Cancellation) behavior of `.click()` applies to both clicks.\n",
      "section": "api",
      "anchors": [
        "events"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 117
    },
    {
      "id": "api/commands/dblclick#a-double-click-fires-two-clicks-then-a-dblclick",
      "doc_id": "api/commands/dblclick",
      "heading": "A double-click fires two clicks, then a dblclick",
      "heading_level": 4,
      "content_markdown": "#### A double-click fires two clicks, then a dblclick\n\nCypress fires the full [`.click()`](/llm/markdown/api/commands/click.md) event sequence twice, then a `dblclick` event, matching what a browser sends for a real double-click. The mouse events in the first click have a `detail` of `1`. The mouse events in the second click, and the `dblclick` event, have a `detail` of `2`. The `pointerdown` and `pointerup` events have a `detail` of `0`.\n\nBecause each click follows the `.click()` rules, the [focus](/llm/markdown/api/commands/click.md#Focus) and [cancellation](/llm/markdown/api/commands/click.md#Cancellation) behavior of `.click()` applies to both clicks.\n",
      "section": "api",
      "anchors": [
        "a-double-click-fires-two-clicks-then-a-dblclick"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 115
    },
    {
      "id": "api/commands/dblclick#text-selection",
      "doc_id": "api/commands/dblclick",
      "heading": "Text selection",
      "heading_level": 3,
      "content_markdown": "### Text selection\n\n#### A double-click does not select the word you double-click\n\nIn a browser, double-clicking a word selects it. Cypress fires the double-click as simulated events, which don't trigger the browser's native text selection. `.dblclick()` doesn't select the word you double-click, in page text or in an input, and it leaves any text that was already selected in place. To select the text in an input or textarea, use [`.type('{selectall}')`](/llm/markdown/api/commands/type.md).\n\n```\ncy.get('[data-cy=title]').type('{selectall}')\n```\n",
      "section": "api",
      "anchors": [
        "text-selection"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 100
    },
    {
      "id": "api/commands/dblclick#a-double-click-does-not-select-the-word-you-double-click",
      "doc_id": "api/commands/dblclick",
      "heading": "A double-click does not select the word you double-click",
      "heading_level": 4,
      "content_markdown": "#### A double-click does not select the word you double-click\n\nIn a browser, double-clicking a word selects it. Cypress fires the double-click as simulated events, which don't trigger the browser's native text selection. `.dblclick()` doesn't select the word you double-click, in page text or in an input, and it leaves any text that was already selected in place. To select the text in an input or textarea, use [`.type('{selectall}')`](/llm/markdown/api/commands/type.md).\n\n```\ncy.get('[data-cy=title]').type('{selectall}')\n```\n",
      "section": "api",
      "anchors": [
        "a-double-click-does-not-select-the-word-you-double-click"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 96
    },
    {
      "id": "api/commands/dblclick#rules",
      "doc_id": "api/commands/dblclick",
      "heading": "Rules",
      "heading_level": 2,
      "content_markdown": "## Rules\n\n### Requirements\n\n*   `.dblclick()` requires being chained off a command that yields DOM element(s).\n*   `.dblclick()` cannot be called on a `<select>` element. Use [`.select()`](/llm/markdown/api/commands/select.md) to change its value.\n\n### Assertions\n\n*   `.dblclick()` automatically waits for the element to reach an [actionable state](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n*   `.dblclick()` itself is not retried. It fires once when the element is actionable. Assertions chained after `.dblclick()` are retried 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*   `.dblclick()` can time out waiting for the element to reach an [actionable state](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n*   `.dblclick()` can time out waiting for assertions you've added to pass.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 139
    },
    {
      "id": "api/commands/dblclick#assertions",
      "doc_id": "api/commands/dblclick",
      "heading": "Assertions",
      "heading_level": 3,
      "content_markdown": "### Assertions\n\n*   `.dblclick()` automatically waits for the element to reach an [actionable state](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n*   `.dblclick()` itself is not retried. It fires once when the element is actionable. Assertions chained after `.dblclick()` are retried until they pass or time out. See [Only queries are retried](/llm/markdown/app/core-concepts/retry-ability.md#Only-queries-are-retried).\n",
      "section": "api",
      "anchors": [
        "assertions"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 60
    },
    {
      "id": "api/commands/dblclick#command-log",
      "doc_id": "api/commands/dblclick",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**_Double-click a div_**\n\n```\ncy.get('.action-div').dblclick()\n```\n\nThe commands above display in the Command Log as:\n\nWhen you click `dblclick` in the Command Log, the console outputs the following:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 41
    },
    {
      "id": "api/commands/dblclick#history",
      "doc_id": "api/commands/dblclick",
      "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| [6.1.0](/llm/markdown/app/references/changelog.md#6-1-0) | Added option `scrollBehavior` |\n| [5.0.0](/llm/markdown/app/references/changelog.md#5-0-0) | Added options `altKey`, `ctrlKey`, `metaKey`, and `shiftKey` |\n| [3.5.0](/llm/markdown/app/references/changelog.md#3-5-0) | `.dblclick()` now follows the same actionability checks as `.click()` |\n| [3.5.0](/llm/markdown/app/references/changelog.md#3-5-0) | Added support for options `force` and `multiple` |\n| [3.5.0](/llm/markdown/app/references/changelog.md#3-5-0) | Added support for `position`, `x`, and `y` arguments |\n| [3.5.0](/llm/markdown/app/references/changelog.md#3-5-0) | Added sending `mouseover`, `mousemove`, `mouseout`, `pointerdown`, `pointerup`, and `pointermove` during `.dblclick()` |\n",
      "section": "api",
      "anchors": [
        "history"
      ],
      "path": "/llm/json/chunked/api/commands/dblclick.json",
      "token_estimate": 136
    }
  ]
}