You also may want to fire an event when a button is pressed such as: ie.Document.forms['f'].elements['btnG'].FireEvent('onClick')
Events: onclick Fires when the user clicks the left mouse button on the object. onsubmit Fires when a FORM is about to be submitted. For more go here: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/dhtml_reference_entry.asp Elliot Temple wrote: > How do I make Python press a button on a webpage? I looked at > urllib, but I only see how to open a URL with that. I searched > google but no luck. > > For example, google has a button <input type=submit value="Google > Search" name=btnG> how would i make a script to press that button? > > Just for fun, is there any way to do the equivalent of typing into a > text field like the google search field before hitting the button? > (I don't actually need to do this.) > > If someone could point me in the right direction it'd be appreciated. > > -- Elliot Temple > http://www.curi.us/ > > > --- > [This E-mail scanned for viruses by Declude Virus] -- http://mail.python.org/mailman/listinfo/python-list