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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Avatar

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

Avatar

Correct answer by
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 = <yourUrl>
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

0 Replies

Avatar

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.

Avatar

Correct answer by
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 = <yourUrl>
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. 

Avatar

Administrator

@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

Avatar

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.

 

 

Avatar

Administrator

@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

Avatar

Level 1

We are using cypress for end user automation testing which works fine, however as part of the platform we are building I want to also have a set of editorial automation tests, however with AEMaaCS we are struggling to get past the cloudmanager SSO login.

 

Has anyone done an AEMaaCS editorial test using cypress that should how to get past the SSO login,