---
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: docs/api/cypress-api/dom.mdx
version: 48b03b5502f7aea1d0454750cce208f775403542
updated_at: '2026-05-20T19:00:20.270Z'
---
# Cypress.dom

`Cypress.dom.method()` is a collection of DOM related helper methods.

There are actually dozens of methods attached to `Cypress.dom` that are not documented below. These methods are used internally by Cypress in nearly every single built in command.

We suggest [reading through the source code here](https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/dom/index.ts) to see all of the methods and what they do.

## Syntax

```
Cypress.dom.isHidden(element)
```

## Examples

### Is attached

**Returns a boolean indicating whether an element is attached to the DOM.**

```
cy.get('button').then(($el) => {  Cypress.dom.isAttached($el) // true})
```

### Is descendent

**Returns a boolean indicating whether an element is a descendent of another element.**

```
cy.get('div').then(($el) => {  Cypress.dom.isDescendent($el.parent(), $el) // true})
```

### Is detached

**Returns a boolean indicating whether an element is detached from the DOM.**

```
cy.get('button').then(($el) => {  Cypress.dom.isDetached($el) // false})
```

### Is document

**Returns a boolean indicating whether a node is of document type.**

```
cy.get('p').then(($el) => {  Cypress.dom.isDocument($el) // false})
```

### Is DOM

**Returns a boolean indicating whether an object is a DOM object.**

```
cy.get('body').then(($el) => {  Cypress.dom.isDom($el) // true})
```

### Is element

**Returns a boolean indicating whether an object is a DOM element.**

```
cy.get('p').then(($el) => {  Cypress.dom.isElement($el) // true})
```

### Is focusable

**Returns a boolean indicating whether an element can receive focus.**

Cypress 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).

```
cy.get('input').then(($el) => {  Cypress.dom.isFocusable($el) // true})
```

### Is focused

**Returns a boolean indicating whether an element currently has focus.**

```
cy.get('button').then(($el) => {  Cypress.dom.isFocused($el)})
```

### Is hidden

**Returns a boolean indicating whether an element is hidden.**

Cypress 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).

```
cy.get('p').then(($el) => {  Cypress.dom.isHidden($el) // false})
```

### Is jQuery

**Returns a boolean indicating whether an object is a jQuery object.**

```
cy.get('input').then(($el) => {  Cypress.dom.isJquery($el)})
```

### Is scrollable

**Returns a boolean indicating whether an element is scrollable.**

Cypress 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).

```
cy.get('body').then(($el) => {  Cypress.dom.isScrollable($el) // true})
```

### Is visible

**Returns a boolean indicating whether an element is visible.**

```
cy.get('img').then(($el) => {  Cypress.dom.isVisible($el) // true})
```

### Is window

**Returns a boolean indicating whether an object is a window object.**

```
cy.get(window).then(($el) => {  Cypress.dom.isWindow($el) // true})
```

### Unwrap

**Returns an array of raw elements pulled out from a jQuery object.**

```
cy.get('body').then(($el) => {  Cypress.dom.unwrap($el)})
```

### Wrap

**Returns a jQuery object obtained by wrapping an object in jQuery.**

```
cy.get('p').then(($el) => {  Cypress.dom.wrap($el)})
```
