controlling web browser in windows

Jeff Shannon jeff at ccvcorp.com
Wed Feb 13 21:33:58 CET 2002


Steve Holden wrote:

> Alan:
>
> There is a COM object in the Windows environment which exposes most of the
> functionality of Internet Exploder. This would proably give you the most
> satisfactory control of the experimental (?) environment, though you would
> have to learn how to "drive" COM objects form Python. Hammond and Robinson's
> "Python Programming on Win32" probably explains most of what you need to
> know about that.
>
> Since I am unable to easily find a reference to the object in question I'll
> leave that to someone who uses it regularly!

When I was working on a similar problem (automating file-uploads via a web
form), I used both the book that Steve mentions (Python Programming on Win32)
and the MS Press book "Programming Internet Explorer 5".  The latter is a bit
heavy on the cheerleading, but it contains *lots* of valuable information on the
IE COM interface.  The only problem is that it's written for VC++ and Visual
Basic... translating to Python can be a nuisance, but isn't *too* hard (but
stick with the VB examples, it's much closer to what you'll want to do).

Of course, I then discovered that much of what I *wanted* to do, was forbidden
from scripts for security reasons, but that's another story.  ;)  (I probably
could've gotten around this by writing my own framework to support their
WebBrowser COM object, but didn't want to put in that much effort...)

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list