I’m using cypress to automate my tests and I faced an issue when performing payments with stripe. Cypress runner vanishes when redirects to Stripe for payments checkout. Has anyone faced this issue? Any idea how to handle it.
Have you tried fetching the URL and handling the redirect, as explained here:
Also, there is thread which you might find helpful - it involves using a token:
this is the iframe problem is it?
I dont use cypress, so never tried, but in selenium, the iframe issue is that you need to “wait” for the iframe, you need to be expecting it, only “switch” once it appears - not before, and then you also need to wait for the iframe to close. Hope that’s a clue.
/edit I meant child window not iframe. I guess people know abotu the webdriverIO needing to attach itself to the new “process” in the payment flows as it’s a new tab/window most of the time.
You are not alone. But it still could be many things… What version are you using?
- After version 5.5 Stripe Checkout tests break out of the iframe · Issue #9447 · cypress-io/cypress · GitHub
- Cypress vanishes when redirecting to site that breaks out of iframe · Issue #1496 · cypress-io/cypress · GitHub
Perhaps it’s the websecurity? “To enable cross-domain iframe interaction, we’ll need to disable web security in Cypress.”