I have a requirement where I need to visit the first URL(ex-www.example.com) and do some AWS operations like verifying the file in AWS S3. After completing all the operations, it should go to the second URL(ex-www.example1.com) in the same test. Need a solution for this?
You will have to run them separately for this to work.
it("Test", function () {
cy.visit('ex-www.example.com');
aws operations here
});
it("Test", function () {
cy.visit('ex-www.example1.com');
});
If you try this:
it("Full Happy Test", function () {
cy.visit('ex-www.example.com');
aws operations here
cy.visit('ex-www.example1.com');
});
You will get this error:
"cy.visit() failed because you are attempting to visit a URL that is of a
different origin."