Cypress · Middle · Question 51 of 77
What is the difference between .within() and .find()?
- 1
.withinscopes all following commands in a callback;.findone query - 2
.withinsearches parents;.findsearches the whole page - 3They are the same command with two names
Show the answer
Correct answer: .within scopes all following commands in a callback; .find one query
Explanation
.within is handy for forms with many fields; .find is a single scoped query.