Skip to content

Instantly share code, notes, and snippets.

@flaccid
Created November 19, 2013 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flaccid/7541374 to your computer and use it in GitHub Desktop.
Save flaccid/7541374 to your computer and use it in GitHub Desktop.
RightScale mechanize
# http://mechanize.rubyforge.org/
require 'mechanize'
agent = Mechanize.new
login_page = agent.get("https://my.rightscale.com/")
logged_in_page = login_page.form_with(:action => '/session') do |form|
form.email="bill.gates@microsoft.com"
form.password="bluescreen"
end.click_button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment