Handling stripe payments checkout with cypress

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.

2 Likes

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.

1 Like

You are not alone. But it still could be many things… What version are you using?

Perhaps it’s the websecurity? “To enable cross-domain iframe interaction, we’ll need to disable web security in Cypress.

2 Likes