Functional test web site using python com and Internet Explorer

John J. Lee jjl at
Thu Jun 10 00:26:50 CEST 2004

chris.cottee at (Chris Cottee) writes:
> particular when I use dispatchWithEvents instead of Dispatch the IE6
> gui almost seems to block (it gets much slower at any rate). Is this
> to be expected ? I have used pythoncom._GetInterfaceCount() to see if
> I was getting loads of references but I only have 2.

Dunno.  Try the python-win32 list.

(URL typed in by hand -- anyone know how to cut-n-paste on X when your
mouse is injured??)

I hesistate a *little* (but not too much) to suggest this, because the
thing really is a pile of junk, but the IOpus "Internet Macros"
product does IE macro recording / playback.  Recording 'macros' like
this (using IE as normal + a little help from a sidebar and popup
windows) is very convenient.  There is a COM IDispatch interface that
just-about works for running recorded macros.  It's cheap.  There is
an ugly-but-serviceable declarative language in which the macros are
recorded.  I've used it to test an application involving lots of
JavaScript.  It would be perfect for functional testing if only the
people who wrote it paid a little more attention to implementation
quality.  For example, you can't single-step through a macro to debug
your application when a test fails.  Painful.  The 'little language'
in which macros are recorded is ugly and has weird arbitrary
restrictions -- and the same goes for the rest of the app.  The docs
are not great.  I had one test fail non-reproducibly (failed
spuriously when run with other failing tests all launched from the
same Python process, passed when run invididually or when run with
other non-failing tests).  Luckily, the restrictions don't actually
get in the way (so far, anyway).  It does (just barely!)  get the job
done: apart from the issue I mention above, the problems I've seen
with it so far are all to do with ease of use rather than correctness
of tests.  Well, apart from the fact that the scripts it records
really *are* just scripts, not programs with conditional logic &c, so
you can't factor out duplicated test logic, and it rather discourages
writing non-trivial tests, which limits its effectiveness.  Also, it's
IE-only and Windows-only: testing against IE/win is necessary but not
really fully sufficient for a lot of people.

Vapourware: before I noticed the IOpus thing, I had the idea of doing
something very similar: using a plugin and a sidebar in IE to function
as a 'macro recorder', but with cross-browser playback (maybe even
cross-browser recording too), using Python instead of a "little
language" to record scripts, (which would do double-duty as a nice
Python API to control IE), etc.  Suffering the IOpus product,
just-about-useable though it is, has revived my interest in the
project ;-)


More information about the Python-list mailing list