Cypress · Junior · Question 8 of 75
What does cy.visit('/products') do?
- 1Sends a GET request without rendering the page at all
- 2Opens that page in the test browser and waits for it to load
- 3Opens the page in a new tab beside the test
Show the answer
Correct answer: Opens that page in the test browser and waits for it to load
Explanation
cy.visit waits for the page's load event before moving on. Use cy.request to call an API without rendering.