View difference between Paste ID: 1V1tQMwE and 4mvEvgCC
SHOW: | | - or go back to the newest paste.
1
require 'rubygems'
2
require 'mechanize'
3
4
a = Mechanize.new
5
a.get(login_url) do |page|
6
  login_page = a.click(page.link_with(:text => /Log In/))
7
8
  my_page = login_page.form_with(:action => '/Login.action') do |f|
9
    f.identity   = login
10
    f.password   = password
11
  end.click_button
12
13
  puts my_page.inspect
14
end