Skip to content

Instantly share code, notes, and snippets.

@cbarratt
Created May 16, 2016 09:24
Show Gist options
  • Save cbarratt/16579b8edbf6f1615100c03a893c4aed to your computer and use it in GitHub Desktop.
Save cbarratt/16579b8edbf6f1615100c03a893c4aed to your computer and use it in GitHub Desktop.
Mondo Bump
require 'rubygems'
require 'capybara'
require 'capybara/dsl'
require 'capybara/poltergeist'
require 'ffaker'
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, browser: :chrome, args: ['--incognito'])
end
Capybara.run_server = false
Capybara.current_driver = :selenium
Capybara.javascript_driver = :selenium
Capybara.app_host = 'https://getmondo.co.uk'
module Mondo
class Signup
include Capybara::DSL
def referral_bump
visit('/?utm_source=user_referral&utm_medium=referral&utm_term=user_000097l0yHwjgH229Fpr1t#signup')
fill_in 'email', with: FFaker::Internet.email
find('input[type="submit"]').click
sleep 0.5
end
end
end
10.times do |i|
mondo = Mondo::Signup.new
mondo.referral_bump
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment