So, my problem is as follows. I connect to a website where a few buttons are to be clicked, and then one of the buttons redirects to another website where the tests are mainly run. Virtually all tests run on the second website, and this can only be reached via the redirect. I’ve tried a few things, but I think I’m having trouble understanding the whole “redirect” issue.
cy.origin("https://Redirectwebsite.com", () => {
cy.visit("https://SiteThatShouldRedirect.com");
cy.get('#submitConsentButton > :nth-child(2)').should("be.visible").click();
cy.get('#oAuthLogin > :nth-child(1)').should("be.visible").click();
});
New contributor
Paul Genz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.