This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding : utf-8 -*- | |
module PayStripeHelpers | |
# must be used with driver: :selenium (or :sauce?) | |
def pay_stripe | |
sleep(0.7) # wait for the js to create the popup in response to pressing the button | |
within_frame 'stripe_checkout_app' do # must be selenium | |
# fill_in 'card_number', with: '4242424242424242' no longer works | |
4.times {page.driver.browser.find_element(:id, 'card_number').send_keys('4242')} | |
# fill_in 'cc-exp', with: '5/2018' no longer works |