Cypress · Junior · Question 48 of 75

How do you find a child element of a found element?

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.

Further reading

Problem with a question

Cypress · Junior · question 48

Test yourself

Take the Cypress · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz