diff --git a/pages/screens.js b/pages/screens.js index f71a2a0..0ebbd5c 100644 --- a/pages/screens.js +++ b/pages/screens.js @@ -24,9 +24,7 @@ export class Screens { } clickOnSave() { - cy.xpath(Selectors.saveBtn) - .should('be.visible') - .click(); + cy.get(Selectors.saveBtn).should('be.visible').click(); } clickOnPublishSave() { cy.xpath(Selectors.savePublishBtn).should('be.visible').click(); diff --git a/selectors/screens.js b/selectors/screens.js index 8541f21..344bb5a 100644 --- a/selectors/screens.js +++ b/selectors/screens.js @@ -13,7 +13,7 @@ export default{ screenTypeEmail: '[data-cy="type-container-E-mail"]', screenTypeDisplay: '[data-cy="type-container-Display"]', screenTypeConversational: '[data-cy="type-container-Conversational"]', - saveBtn: '//button[text()="Publish"]', + saveBtn: '[data-cy="create_screen_save_btn"]', savePublishBtn: '//button[text()="Publish"]', varaibleNameTxtBx: '[name="Variable Name"]', //Data Source configuration