Created
July 4, 2012 00:27
-
-
Save the55/3044358 to your computer and use it in GitHub Desktop.
master card ATM
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
require 'rubygems' | |
# require 'akephalos' | |
require 'capybara' | |
require 'capybara/dsl' | |
require 'capybara-webkit' | |
# require 'pry' | |
Capybara.run_server = false | |
Capybara.current_driver = :selenium | |
# Capybara.javascript_driver = :akephalos | |
Capybara.javascript_driver = :webkit | |
Capybara.app_host = 'http://www.mastercard.us/' | |
module MyCapybaraTest | |
class Test | |
include Capybara | |
def test_cards | |
['02143', '12866', '02138'].each do |zip| | |
visit('/cardholder-services/atm-locator.html') | |
sleep 4 | |
fill_in 'postalCode', :with => zip | |
click_button 'find' | |
sleep 5 | |
puts "count for #{zip} - #{all("#endNumber").first.text}" | |
end | |
end | |
end | |
end | |
t = MyCapybaraTest::Test.new | |
t.test_cards |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment