I have this code
require 'mechanize'
@agent = Mechanize.new
page = @agent.get('http://something.com/?page=1')
next_page = page.link_with(:href=>/^?page=2/).click
As you can see this code should go to the next page.
The next_page
should have url http://something.com/?page=2
How to get current url for next_page
?