[python-win32] automating Internet Explorer for functional testing
of web pages
Chris Cottee
Chris.Cottee at WallStreetSystems.com
Thu Jun 10 12:57:21 EDT 2004
Hi,
I'm trying to use Internet explorer (automated via win32com) to test
our website (which uses frames and javascript heavily) and I wondered if
anyone could answer a couple of questions:
1. Has anyone done this already? (I know about PAMIE, I was after any other
resources that might be about the place)
2. When I use WithEvents IE slows right down and I can't interact with it
any more, it's like it's blocking waiting for some response to the event. Is
this normal ? Or am I doing something wrong ? My code looks like this
class EventSink(object):
""" an event sink for the com events"""
def OnError(self,*someargs):
print "Error",someargs
def OnNavigateComplete2(self,*args):
print "complete" ,args
class IE(object):
def __init__(self):
"""abbreviated"""
self._ie = Dispatch('InternetExplorer.Application')
self.events=WithEvents(self._ie,EventSink)
3. More of an IE question than a python question: does anyone know how to
detect JavaScript errors via the WebBrowserControl2 interface?
Thanks,
Chris Cottee
More information about the Python-win32
mailing list