Subject: | uri should be set after a request rather than before |
Mechanize's uri() method returns the value of the uri variable. The variable is currently set *before* requests are made - eg: in get(), click(), submit(). This may result in uri() returning a value that does not match the page the agent is actually on. This can happen in two ways.
Firstly, the request may fail.
Secondly, the request may result in one or more redirections.
So, we should instead set the uri variable *after* the requests are completed.