Complete the code to visit a webpage using Cypress.
cy.[1]('https://example.com')
The correct Cypress command to open a webpage is visit.
Complete the code to assert that an element contains specific text in Cypress.
cy.get('.message').should('[1]', 'Hello World')
The contain assertion checks if the element includes the given text.
Fix the error in the Cypress test to wait for an element to be visible.
cy.get('#submit').[1]('be.visible')
The should command is used to assert conditions like visibility in Cypress.
Fill both blanks to create a test that clicks a button and verifies URL change in Cypress.
cy.get('[1]').click() cy.url().should('[2]', '/dashboard')
The selector for the button is #login-button. The URL assertion uses include to check partial match.
Fill all three blanks to write a Cypress test that types into an input, submits a form, and checks success message.
cy.get('[1]').type('user@example.com') cy.get('[2]').click() cy.get('[3]').should('contain', 'Success')
The input field has ID #email-input, the submit button has ID #submit-btn, and the success message uses class .success-message.