title: How do I enter data into a form input in an iframe using cypress?
body: <p>I have been trying to test a stripe checkout form using cypress.io</p>
  
  <p>If anyone has managed to get this to work please let me know. I found a thread on the matter here <a href="https://github.com/cypress-io/cypress/issues/136" rel="noreferrer">https://github.com/cypress-io/cypress/issues/136</a> and based on this I came up with:</p>
  
  <pre><code>   cy.get('iframe.stripe_checkout_app')
        .wait(10000)
        .then($iframe =&gt; {
          const iframe = $iframe.contents()
          const myInput0 = iframe.find('input:eq(0)')
          const myInput1 = iframe.find('input:eq(1)')
          const myInput2 = iframe.find('input:eq(2)')
          const myButton = iframe.find('button')
  
          cy
            .wrap(myInput0)
            .invoke('val', 4000056655665556)
            .trigger('change')
          cy
            .wrap(myInput1)
            .invoke('val', 112019)
            .trigger('change')
  
          cy
            .wrap(myInput2)
            .invoke('val', 424)
            .trigger('change')
  
          cy.wrap(myButton).click({ force: true })
        })
  </code></pre>
  
  <p>But the problem is that the stripe form still does not register the input values. Here is a little gif of what happens <a href="http://www.giphy.com/gifs/xT0xeEZ8CmCTVMwOU8" rel="noreferrer">http://www.giphy.com/gifs/xT0xeEZ8CmCTVMwOU8</a>. Basically, the form does not register the change input trigger. </p>
  
  <p>Does anyone know how to enter data into a form in an iframe using cypress?</p>