Skip to content

Instantly share code, notes, and snippets.

@JoaoGFarias
Last active April 3, 2023 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoaoGFarias/374643691e235ab48cfd7cb28062ef1a to your computer and use it in GitHub Desktop.
Save JoaoGFarias/374643691e235ab48cfd7cb28062ef1a to your computer and use it in GitHub Desktop.
Login scenario
Scenario: I perform the login
When Perform login
When("Perform login", () => {
cy.visit("https://the-internet.herokuapp.com/login")
cy.get('#username').type("tomsmith")
cy.get('#password').type("SuperSecretPassword!")
cy.get('button').click()
cy.wait(3000)
cy.get("h2").should('have.text',"Secure Area")
cy.get("h4").should('have.text',"Welcome to the Secure Area. When you are done click logout below.")
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment