Created
September 17, 2010 00:39
-
-
Save ivanacostarubio/583448 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'capybara' | |
| require 'capybara/dsl' | |
| Capybara.current_driver = :selenium | |
| Capybara.app_host = 'http://www.fpl.com' | |
| Capybara.run_server = false | |
| class FPL | |
| include Capybara | |
| def pay | |
| visit('https://app.fpl.com/eca/EcaController') | |
| fill_in "userid", :with => "YOUR_LOGIN" | |
| fill_in "password", :with => "YOUR_PASSWORD" | |
| click_button "Log In" | |
| click_link("Pay Bill") | |
| choose("totalDueAmount") | |
| fill_in "requested_by", :with => "YOUR_NAME" | |
| click_link("Accept Terms & Conditions") | |
| click_link("OK") | |
| end | |
| end | |
| runner = FPL.new | |
| runner.pay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment