[python-win32] Intenet explorer using PythonWin Help
Mike Driscoll
mdriscoll at co.marshall.ia.us
Wed Dec 22 15:31:27 CET 2010
On 1:59 PM, Pat McGuire wrote:
>
> I am new at programming with Python and am using Pythonwin. I have a
> couple of questions'
>
> 1. The code below after doc.FormName.submit() will navigate to
> the correct page but if I print the url it shows the url of the page I
> logged in at. I thought submit would be just like if I clicked on the
> submit button.
>
> import win32com.client
> import win32api
> ie = win32com.client.Dispatch( "InternetExplorer.Application" )
> ie.Visible = 1
> ie.Navigate("urlhere
> <http://posting.www.backpage.com/classifieds/central/index>")
> while ie.Busy == True:
> win32api.Sleep(1000)
> doc = ie.Document
> doc.FormName.email.value = "emailaddress <mailto:doublepllc at gmail.com>"
> doc.FormName.password.value = "mypassword"
> doc.FormName.submit()
>
> 2. Can you point me to a site that which show me how to access each
> type of form element, i.e. option, hrefs, links, etc
>
>
> Any help is greatly appreciated.
>
I've heard good things about Mechanize:
http://mechanize.rubyforge.org/mechanize/
It's not PyWin32, but it's probably easier to use than win32com methods.
--
Mike Driscoll
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20101222/f201837c/attachment.html>
More information about the python-win32
mailing list