Can't complete the stripe form fields after redirection #28276
Unanswered
Anag03
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys
On my project, we have a stripe pricing table where the user can click a button to create a subscription and it redirects to this URL
https://checkout.stripe.com/c/pay/cs_test_a1UgwwtQ7POyL3aTstzchdzMxtZl5FvPk0mCfzLeSA0ZP0ToSd95KsZ240#fidkdWxOYHwnPyd1blpxYHZxWjZON1xqRnIyTGFuRDRGU0drb2AwX0NSMTU1fG0xcFYxTG0neCUl
Where cs_test is a unique value for each customer and it's created when the button is clicked.
The issue is when the new page is opened, cypress commands don't work
I found a web where the same behavior can be replicated https://stripe-tinydemos-pricing-table.glitch.me/

This is the page opened:
This is my code
it.only('should open the stripe checkout page', function(){ cy.visit('https://stripe-tinydemos-pricing-table.glitch.me/') cy.get('stripe-pricing-table[pricing-table-id="prctbl_1LPkKBAPEf9EarUkgSuVM4vY"]').shadow().find('iframe', {timeout:5000}) .its('0.contentDocument.body').should('not.be.undefined') .then(cy.wrap) .find('div[data-testid="price-column"]').eq(1) .find('button').click() cy.origin('https://checkout.stripe.com/', () => { cy.get('input[name="shippingName"]').click().type('Ana'); }); });
cy.origin doesn't work, so I can't complete the fields.
If you could help me, please
Beta Was this translation helpful? Give feedback.
All reactions