Created
August 17, 2009 20:46
-
-
Save jarib/169368 to your computer and use it in GitHub Desktop.
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
def process_bills | |
bills = agent.links.select{|link| link.href if link.href.match(/billDetailSubmit/)}.compact | |
raise StandardError, 'Unable to find bills' unless bills | |
returning statements = [] do | |
bills.each do |bill| | |
statements << parse_statement_data_from(bill) | |
break unless include_historical_data | |
end | |
end | |
def parse_statement_data_from(href) | |
agent.link(:url, href).click # relocate the element for each iteration | |
......... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment