Cypress · Middle · Question 5 of 77
What does .its('length') do?
- 1Counts how many commands ran in the test
- 2Returns the test duration in milliseconds
- 3Gets a property of the subject, with retrying
Show the answer
Correct answer: Gets a property of the subject, with retrying
Explanation
.its() is a query, so cy.get('li').its('length').should('be.gt', 2) retries. .invoke() calls a method on the subject.