win32com: makepy causes ie problems.
Mark Hammond
mhammond at skippinet.com.au
Fri Jul 19 03:41:40 EDT 2002
David LeBlanc wrote:
> While trying to figure out how to make the recently posted (by Paul Rubin)
> ie navigation example work, I had occasion to run makepy.py on "Microsoft
> Internet Controls". After doing this, the sample would fail on "ie.visible =
> 1". Removing the generated file would return the sample to working order.
>
> Sample:
> from win32com.client import DispatchEx
> import time
>
> ie = DispatchEx('internetexplorer.application')
> ie.visible = 1
> ie.navigate('http://www.w3.org')
Was the problem "AttributeError: visible"? If so, the problem is simply
that the correct name for the property is "Visible". makepy is case
sensitive.
> I'm also interested, as the comment suggests, on how to wait for a browser
> to finish navigating before I query it's state? Come to think of it, is
> there any way to get back an error status like <ahem> "403"? :)
The best way is to hook IE events. See the docstring for
DispatchWithEvents, and the examples in the win32com\test directory.
Mark.
More information about the Python-list
mailing list