How do I check whether the submit has been successful or not. When I give correct username it does not show anything. But even if I submit wrong username, it does not throw any errors. How to catch the errors or check success results. Any help will be greatly appreciated. Thank you.
code:
try:
import mechanize
except ImportError:
print "Could not import Mechanize. Please install from Mechanize website."
br = mechanize.Browser()
interletter = 'http://somesite.com/adminpanel/index.php'
br.open(interletter)
print br.geturl()
br.select_form(name="frm_login")
br["admin_userid"] = "user"
br["admin_password"] = "pword"
result2 = br.submit()
http://somesite.com/adminpanel/index.php
<response_seek_wrapper at 0x25a3cb0 whose wrapped object = <closeable_response at 0x25ab738 whose fp = <socket._fileobject object at 0x025A0970>>>