Skip to content

Instantly share code, notes, and snippets.

@bkerley
Created September 28, 2011 01:51
Show Gist options
  • Save bkerley/1246792 to your computer and use it in GitHub Desktop.
Save bkerley/1246792 to your computer and use it in GitHub Desktop.
require 'capybara/dsl'
include Capybara::DSL
Capybara.current_driver = :selenium
Capybara.app_host = 'https://ssl.bing.com'
# do log in stuff here
def slumlord(thing)
click_on thing
rescue
sleep 5
click_on thing
end
3.times do
visit '/rewards/redeem/Product/Index?category_id=6561'
slumlord 'Sweepstakes: 10 entries for Dream Entertainment Room'
slumlord 'add to cart'
slumlord 'Checkout'
slumlord 'Complete Checkout'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment