1

As part of e2e scenario, I am trying to select credit card details on Payment Page of 3rd party website. Unless i make the payment my scenario will not be completed. Post Payments i also need to check the order details.

I am getting below error - Cypress detected a cross origin error happened on page load:

Blocked a frame with origin "https:// some url" from accessing a cross-origin frame. Before the page load, you were bound to the origin policy: https:// some url A cross origin error happens when your application navigates to a new URL which does not match the origin policy above.

I checked with { chromeWebSecurity: false } in cypress.json file and few other getIframe() methods but it is not working.

Is this possible to test such scenario with current cypress limitations?

AbhiNik
  • 21
  • 1

1 Answers1

0

Cypress does not support cross domain testing. If you want to test this, copy the url as a variable and then add another test starting with:

cy.visit(url)
do stuff here
ItsNotAndy
  • 563
  • 5
  • 17