Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Last active August 3, 2022 08:40
Show Gist options
  • Save SarahElson/a493c2c84d19c93d35b7ee31491368c6 to your computer and use it in GitHub Desktop.
Save SarahElson/a493c2c84d19c93d35b7ee31491368c6 to your computer and use it in GitHub Desktop.
Cypress End to End Testing: Case Example 1
/// <reference types="cypress" />
it("Open the Url", () => {
cy.visit(
"https://ecommerce-playground.lambdatest.io/index.php?route=account/login"
);
});
it("Login into the application", () => {
cy.get('[id="input-email"]').type("[email protected]");
cy.get('[id="input-password"]').type("lambdatest");
cy.get('[type="submit"]').eq(0).click();
});
it("Search the Product", () => {
cy.get('[name="search"]').eq(0).type("VAIO");
cy.get('[type="submit"]').eq(0).click();
});
it("Verify Product after search ", () => {
cy.contains("Sony VAIO");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment