469,927 Members | 1,777 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

How do I get the reference of window in DOM?

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.

Thanks in advance.

Sam
Jul 18 '05 #1
1 1684
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

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sibylle Koczian | last post: by
2 posts views Thread by N/A | last post: by
2 posts views Thread by Brian Vallelunga | last post: by
2 posts views Thread by learner | last post: by
4 posts views Thread by Chris Beall | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.