My adventures in IE automation continue. I'm now able to start IE, navigate
to a page, and process events as they occur. Unfortunately, when I try to
reference the document after it is loaded and displayed I encounter a number
of problems.
The relevant code is as follows:
self.ie = win32com.client.DispatchWithEvents(
"InternetExplorer.Application",
ieEvents)
(snip)
ie.Navigate(url) # navigate to page
(snip)
try:
frames = yie.ie.Document.frames
print "Frames length", frames.length
except:
print "No frames error"
print sys.exc_info()
This last bit of code prints
No frames error
(<class 'pywintypes.com_error'>, com_error(-2147467262, 'No such
interface supported', None, None), <traceback object at 0x00CC1418>)
In an effort to correct the problem, I ran MakePY against several interfaces
that looked like they might be appropriate. Subsequently, the code
print "Ready State", ie.Document.ReadyState
which had been working also started to generate a 'No such interface
supported' error.
I've modeled my access to the DOM after cPamie and run it's certification
routines to verify that Python is generally sound.
Does anyone know how to address this issue?
Thanks,
Richard
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32