Cloudlog/cypress/support/commands.js

9 lines
279 B
JavaScript
Raw Permalink Normal View History

2024-04-05 20:36:16 +00:00
Cypress.Commands.add("login", () => {
const username = "m0abc";
const password = "demo";
cy.visit("/index.php/user/login");
cy.get('input[name="user_name"]').type(username);
cy.get('input[name="user_password"]').type(password);
cy.get('button[type="submit"]').click();
});