Skip to content

Commit a733e99

Browse files
update example in dom to be accurate and match cypress flow better.
1 parent bf87623 commit a733e99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/api/cypress-api/dom.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Cypress.dom.isHidden(element)
2828
Cypress internally uses this method *everywhere* to figure out whether an element is hidden, {% url "mostly for actionability" interacting-with-elements %}.
2929

3030
```javascript
31-
const $el = $("#modal")
32-
33-
Cypress.dom.isHidden($el) // => false
31+
cy.get('p').then(($el) => {
32+
Cypress.dom.isHidden($el) // false
33+
})
3434
```

0 commit comments

Comments
 (0)