{
  "doc": {
    "id": "api/cypress-api/dom",
    "title": "Cypress.dom | Cypress Documentation",
    "description": "Cypress.dom.method() is a collection of DOM related helper methods in Cypress",
    "section": "api",
    "source_path": "/llm/markdown/api/cypress-api/dom.md",
    "version": "48b03b5502f7aea1d0454750cce208f775403542",
    "updated_at": "2026-05-20T19:00:20.270Z",
    "headings": [
      {
        "id": "api/cypress-api/dom#cypress-dom",
        "text": "Cypress.dom",
        "level": 1
      },
      {
        "id": "api/cypress-api/dom#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/cypress-api/dom#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/cypress-api/dom#is-attached",
        "text": "Is attached",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-descendent",
        "text": "Is descendent",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-detached",
        "text": "Is detached",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-document",
        "text": "Is document",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-dom",
        "text": "Is DOM",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-element",
        "text": "Is element",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-focusable",
        "text": "Is focusable",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-focused",
        "text": "Is focused",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-hidden",
        "text": "Is hidden",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-jquery",
        "text": "Is jQuery",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-scrollable",
        "text": "Is scrollable",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-visible",
        "text": "Is visible",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#is-window",
        "text": "Is window",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#unwrap",
        "text": "Unwrap",
        "level": 3
      },
      {
        "id": "api/cypress-api/dom#wrap",
        "text": "Wrap",
        "level": 3
      }
    ]
  },
  "chunks": [
    {
      "id": "api/cypress-api/dom#examples",
      "doc_id": "api/cypress-api/dom",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### Is attached\n\n**Returns a boolean indicating whether an element is attached to the DOM.**\n\n```\ncy.get('button').then(($el) => {  Cypress.dom.isAttached($el) // true})\n```\n\n### Is descendent\n\n**Returns a boolean indicating whether an element is a descendent of another element.**\n\n```\ncy.get('div').then(($el) => {  Cypress.dom.isDescendent($el.parent(), $el) // true})\n```\n\n### Is detached\n\n**Returns a boolean indicating whether an element is detached from the DOM.**\n\n```\ncy.get('button').then(($el) => {  Cypress.dom.isDetached($el) // false})\n```\n\n### Is document\n\n**Returns a boolean indicating whether a node is of document type.**\n\n```\ncy.get('p').then(($el) => {  Cypress.dom.isDocument($el) // false})\n```\n\n### Is DOM\n\n**Returns a boolean indicating whether an object is a DOM object.**\n\n```\ncy.get('body').then(($el) => {  Cypress.dom.isDom($el) // true})\n```\n\n### Is element\n\n**Returns a boolean indicating whether an object is a DOM element.**\n\n```\ncy.get('p').then(($el) => {  Cypress.dom.isElement($el) // true})\n```\n\n### Is focusable\n\n**Returns a boolean indicating whether an element can receive focus.**\n\nCypress internally uses this method _everywhere_ to figure out whether an element is hidden, [mostly for actionability](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n\n```\ncy.get('input').then(($el) => {  Cypress.dom.isFocusable($el) // true})\n```\n\n### Is focused\n\n**Returns a boolean indicating whether an element currently has focus.**\n\n```\ncy.get('button').then(($el) => {  Cypress.dom.isFocused($el)})\n```\n\n### Is hidden\n\n**Returns a boolean indicating whether an element is hidden.**\n\nCypress internally uses this method _everywhere_ to figure out whether an element is hidden, [mostly for actionability](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n\n```\ncy.get('p').then(($el) => {  Cypress.dom.isHidden($el) // false})\n```\n\n### Is jQuery\n\n**Returns a boolean indicating whether an object is a jQuery object.**\n\n```\ncy.get('input').then(($el) => {  Cypress.dom.isJquery($el)})\n```\n\n### Is scrollable\n\n**Returns a boolean indicating whether an element is scrollable.**\n\nCypress internally uses this method _everywhere_ to figure out whether an element can be scrolled, [mostly for actionability](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n\n```\ncy.get('body').then(($el) => {  Cypress.dom.isScrollable($el) // true})\n```\n\n### Is visible\n\n**Returns a boolean indicating whether an element is visible.**\n\n```\ncy.get('img').then(($el) => {  Cypress.dom.isVisible($el) // true})\n```\n\n### Is window\n\n**Returns a boolean indicating whether an object is a window object.**\n\n```\ncy.get(window).then(($el) => {  Cypress.dom.isWindow($el) // true})\n```\n\n### Unwrap\n\n**Returns an array of raw elements pulled out from a jQuery object.**\n\n```\ncy.get('body').then(($el) => {  Cypress.dom.unwrap($el)})\n```\n\n### Wrap\n\n**Returns a jQuery object obtained by wrapping an object in jQuery.**\n\n```\ncy.get('p').then(($el) => {  Cypress.dom.wrap($el)})\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/cypress-api/dom.json",
      "token_estimate": 496
    },
    {
      "id": "api/cypress-api/dom#is-focusable",
      "doc_id": "api/cypress-api/dom",
      "heading": "Is focusable",
      "heading_level": 3,
      "content_markdown": "### Is focusable\n\n**Returns a boolean indicating whether an element can receive focus.**\n\nCypress internally uses this method _everywhere_ to figure out whether an element is hidden, [mostly for actionability](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n\n```\ncy.get('input').then(($el) => {  Cypress.dom.isFocusable($el) // true})\n```\n",
      "section": "api",
      "anchors": [
        "is-focusable"
      ],
      "path": "/llm/json/chunked/api/cypress-api/dom.json",
      "token_estimate": 51
    },
    {
      "id": "api/cypress-api/dom#is-hidden",
      "doc_id": "api/cypress-api/dom",
      "heading": "Is hidden",
      "heading_level": 3,
      "content_markdown": "### Is hidden\n\n**Returns a boolean indicating whether an element is hidden.**\n\nCypress internally uses this method _everywhere_ to figure out whether an element is hidden, [mostly for actionability](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n\n```\ncy.get('p').then(($el) => {  Cypress.dom.isHidden($el) // false})\n```\n",
      "section": "api",
      "anchors": [
        "is-hidden"
      ],
      "path": "/llm/json/chunked/api/cypress-api/dom.json",
      "token_estimate": 49
    },
    {
      "id": "api/cypress-api/dom#is-scrollable",
      "doc_id": "api/cypress-api/dom",
      "heading": "Is scrollable",
      "heading_level": 3,
      "content_markdown": "### Is scrollable\n\n**Returns a boolean indicating whether an element is scrollable.**\n\nCypress internally uses this method _everywhere_ to figure out whether an element can be scrolled, [mostly for actionability](/llm/markdown/app/core-concepts/interacting-with-elements.md).\n\n```\ncy.get('body').then(($el) => {  Cypress.dom.isScrollable($el) // true})\n```\n",
      "section": "api",
      "anchors": [
        "is-scrollable"
      ],
      "path": "/llm/json/chunked/api/cypress-api/dom.json",
      "token_estimate": 51
    }
  ]
}