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:[email protected]>"
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

_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to