[python-win32] How can I get the parentWindow.document object?

goodol Dolka1 at gmail.com
Sat Sep 1 21:11:45 EDT 2007


hello everybody

i am trying to automatie IE using python, and i want to access at the
parentWindow.document object

the code is like this,

import win32com.client
import pythoncom
ie = win32com.client.Dispatch("InternetExplorer.Application")
doc=ie.Document.parentWindow.document

the code always failed. the error message is "pywintypes.com_error:
(-2147352567, ...."

How can i get the parentWindow.document object? what' the reason the
code failed?

Thanks in advance.




More information about the Python-list mailing list