Cypress · Junior · Question 9 of 75

What does cy.get('[data-cy=submit]') do?

Show the answer

Correct answer: Finds elements by selector, retrying until they appear

Explanation

cy.get queries the DOM and retries until the element exists or the timeout (4 s by default) runs out.

Further reading

Problem with a question

Cypress · Junior · question 9

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