diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 0a25ff5cab..c067974d9f 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -285,7 +285,7 @@ Cypress.Commands.add("get_open_dialog", () => { Cypress.Commands.add("save", () => { cy.intercept("/api/method/frappe.desk.form.save.savedocs").as("save_call"); - cy.get(`button[data-label="Save"]:visible`).click({ scrollBehavior: "top", force: true }); + cy.get(`.page-container:visible button[data-label="Save"]`).click({ force: true }); cy.wait("@save_call"); }); Cypress.Commands.add("hide_dialog", () => {