Cypress · Middle · Question 5 of 77

What does .its('length') do?

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.

Further reading

Problem with a question

Cypress · Middle · question 5

Test yourself

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

Take this quiz