Advanced navigation request configuration
Navigation is one of the most important aspects of properly running tests. By using the cy.visit()
, cy.go()
, and even cy.reload()
commands, we have the ability to know what shortcuts to take when writing our tests. The navigation commands also significantly simplify test workflows. Most of the frontend tests require navigation and, therefore, grasping the advanced configuration will not only make your life easier but will also lead to a smoother experience while writing tests. In this section, we will focus mainly on the Cypress advanced command configuration for cy.visit()
as it is the main navigation command for Cypress.
cy.visit() configuration options
The following table shows the configuration options for the cy.visit()
command and the default values that are loaded when no options are passed to the option object:
The cy.visit()
command accepts different types of parameters and this...