How do I get the reference of window in DOM?
Amol Dharmadhikari
adharma at cs.usfca.edu
Thu Mar 25 19:56:30 EST 2004
Hi-
Sam Kong wrote:
> Hello!
>
> Now I know how to get dom of ie using the following code.
>
> from win32com.client import DispatchEx
> ie = DispatchEx('internetexplorer.application')
> ie.visible = 1
> ie.navigate(url)
> dom = ie.Document
>
> My question is that how do I get the window reference from dom?
>
> I want to close the ie from my Python code.
> I don't know how to access the window object.
>
> ie.Window is not the answer.
If you want to close the window from the python code,
ie.quit()
should do it.
>
> Thanks in advance.
>
> Sam
Amol
More information about the Python-list
mailing list