Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Has anyone used Cypress to perform UI functional testing in AEM sites?

Marjia_Yeasmin_TL
Level 2
Level 2

We are planning to Cypress instead of Selenium webdriver to do UI functionality testing in AEM sites. Wondering whether anyone has used it in their projects. Would be good if you can please share your insights with me. Thanks in advance.

1 Accepted Solution
Ritesh21
Correct answer by
Level 1
Level 1

Can you please refer me to those workarounds, especially for multiple tabs. I have tried to use stubs, but was not successful. This is the code I have

 

const editWindowUrl =
      "http://13.238.219.201:4502/editor.html/content/we-retail/language-masters/en.html";
cy.window().then((win) => {
const stub = cy.stub(win, "open").as("windowOpen");
});
cy.contains("Edit").click();
cy.get("@windowOpen").should("be.called");
cy.window().then((win) => {
win.location.href = editWindowUrl;
});

 

Thanks in advance. 

View solution in original post

5 Replies
igopisrinivasan
Level 1
Level 1

We currently using Cypress for UI Functional Automation for AEM sites and it is working fine.

iframe and multiple tab functionality wont work and but we can do workaround for that.

Ritesh21
Correct answer by
Level 1
Level 1

Can you please refer me to those workarounds, especially for multiple tabs. I have tried to use stubs, but was not successful. This is the code I have

 

const editWindowUrl =
      "http://13.238.219.201:4502/editor.html/content/we-retail/language-masters/en.html";
cy.window().then((win) => {
const stub = cy.stub(win, "open").as("windowOpen");
});
cy.contains("Edit").click();
cy.get("@windowOpen").should("be.called");
cy.window().then((win) => {
win.location.href = editWindowUrl;
});

 

Thanks in advance. 

View solution in original post

kautuk_sahni
Community Manager
Community Manager

@Ritesh21 , Thank. you for sharing the solution with AEM community. Looking forward to more contribution from you here. Great to have AEM SMEs like you here. Keep it up

Marjia_Yeasmin_TL
Level 2
Level 2

Hi @igopisrinivasan

 

I'm wondering whether you would be able to share the initial AEM project set up with ui.tests modules in Cypress? Thanks in advance.

 

 

kautuk_sahni
Community Manager
Community Manager

@igopisrinivasan , Thank. you for sharing the solution with AEM community. Looking forward to more contribution from you here. Great to have AEM SMEs like you here. Keep it up