cypress
cypress copied to clipboard
Clicking on some buttons not working
Current behavior
Clicking on the Registration button in our train eshop (OpenCart, PHP), the Cypress performs click, form is submitted, but the application does not load the confirmation page. Cypress run failed due to an error: It was timed out after waiting 60000ms for your remote page to load. I tried to click Manually in Cypress App runner but the behavior is the same.
Timed out after waiting 60000ms for your remote page to load.
Your page did not fire its load event within 60000ms.
You can try increasing the pageLoadTimeout value in cypress.config.js to wait longer.
Browsers will not fire the load event until all stylesheets and scripts are done downloading.
When this load event occurs, Cypress will continue running commands.
Desired behavior
Click will submit the form and the confirmation page is loaded.
Test code to reproduce
describe("Cypress click Bug - reproduced steps", () => {
it("Failing click ", () => {
const randomEmail = Math.random().toString(36).substring(2) + "@example.com";
cy.visit("https://tredgate.com/eshop/index.php?route=account/register");
cy.get("#input-firstname").type("John");
cy.get("#input-lastname").type("Doe");
cy.get("#input-email").type(randomEmail);
cy.get("#input-telephone").type("1234567890");
cy.get("#input-password").type("123456");
cy.get("#input-confirm").type("123456");
cy.get('input[name="agree"]').check();
cy.get('input[type="submit"]').click();
//Alternative to submit form directly
//cy.get('form').submit();
cy.get("#content h1").should("have.text", "Your Account Has Been Created!");
});
});
Cypress Version
13.7.1
Node version
v16.20.0
Operating System
macOS 14.2.1 (23C71)
Debug Logs
Debug log is in attachments in the Current Behavior as it too long to insert there
Other
The form will work fine if I test it manually without Cypress in a browser (Chrome 123.0.6312.86). The submission took there about a few seconds.
https://github.com/cypress-io/cypress/assets/95618620/d0b1a3eb-0162-49cc-9223-8d0c9567ec5e