Skip to content

Instantly share code, notes, and snippets.

@bdarcus
Created November 6, 2009 15:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdarcus/228039 to your computer and use it in GitHub Desktop.
Save bdarcus/228039 to your computer and use it in GitHub Desktop.
# mechanize
require 'rubygems'
require 'mechanize'
agent = WWW::Mechanize.new
page = agent.get('http://google.com/')
page = agent.click page.links.find { |l| l.text == 'News' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment