Skip to content

Instantly share code, notes, and snippets.

@jarib
Created August 17, 2009 20:46
Show Gist options
  • Save jarib/169368 to your computer and use it in GitHub Desktop.
Save jarib/169368 to your computer and use it in GitHub Desktop.
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