Skip to content

Instantly share code, notes, and snippets.

@bahrmichael
Created September 2, 2019 17:16
Show Gist options
  • Save bahrmichael/6ad17009aae4709802e8211de3dd6264 to your computer and use it in GitHub Desktop.
Save bahrmichael/6ad17009aae4709802e8211de3dd6264 to your computer and use it in GitHub Desktop.
/// <reference types="Cypress" />
context('Actions', () => {
it('should fill out creditcard', () => {
cy.getWithinIframe('[name="cardnumber"]').type('4242424242424242');
cy.getWithinIframe('[name="exp-date"]').type('1232');
cy.getWithinIframe('[name="cvc"]').type('987');
cy.getWithinIframe('[name="postal"]').type('12345');
// adjust this to use your own pay now button
cy.get('[data-cy="pay-now"]').click();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment