Next-Gen App & Browser
Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

What is DOM in Cypress?

The Dom method is a function that allows you to create an element programmatically in the browser. The Dom method makes it easier for a tester to write tests in Cypress.

A Document Object Model (DOM) is a way for JavaScript to see the data on a page. It includes the formatting of HTML, XML, or XHTML and the browser state. This means you can add classes to these DOM elements using CSS or interact with them using Javascript.

Cypress.dom().methods() is a collection of DOM-related helper methods. Cypress uses these methods internally in nearly every built-in command, but you may need to be aware of their existence because they are not documented below.

Test your website on 3000+ browsers

Get 100 minutes of automation test minutes FREE!!

Test Now...

KaneAI - Testing Assistant

World’s first AI-Native E2E testing agent.

...
ShadowLT Logo

Start your journey with LambdaTest

Get 100 minutes of automation test minutes FREE!!

Signup for free