Cypress · Junior · Question 48 of 75
How do you find a child element of a found element?
- 1
cy.get('.card > ').get('button') - 2
cy.get('.card').find('button') - 3
cy.get('.card').child('button')
Show the answer
Correct answer: cy.get('.card').find('button')
Explanation
.find() searches descendants of the subject. Chaining cy.get would search the whole document again.