By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,767 Members | 1,357 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,767 IT Pros & Developers. It's quick & easy.

How do I get the reference of window in DOM?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.