How to write integration tests for Stripe checkout on Rails?

前端 未结 5 1785
忘掉有多难
忘掉有多难 2020-12-14 02:24

I\'ve hit the wall trying to write an integration test for Stripe\'s checkout.js [ https://checkout.stripe.com/checkout.js ] for my Rails 3.2 app.

Stripe checkout wo

5条回答
  •  旧巷少年郎
    2020-12-14 03:21

    For capybara-webkit, I was able to get this to work:

      stripe_iframe = page.driver.window_handles.last
      page.within_window stripe_iframe do
        fill_in "email", with: "test-user@example.com" 
        ...
      end
    

提交回复
热议问题