[python-win32] controlling modal internet explorer popups

John J Lee jjl at pobox.com
Tue Jul 6 20:24:40 CEST 2004


On Tue, 6 Jul 2004, Michael Smith wrote:

> Has anyone managed to use win32com to control Internet Explorer popups,
> such as javascript alerts.
>
> Suppose I have a web page that asks me to confirm when I hit submit.
>
> If I have code like this
>
> ie.Document.getElementById('submit_button').Click()
> print "I clicked on it"
>
> then the second line is never reached, as internet explorer is sitting
> there waiting for someone to click on the pop-up.
>
> Is there any way round this?

I don't know, but I have a vague suspicion there's no way around it other
than using Windows events.  I suspect that because, IIRC, that's the way
the 'Internet Macros' product sold by IOpus works.  OTOH, that may just be
my bad memory, or it may just be because the IOpus software is so flaky
;-)

Perhaps you can stop the pop-up from appearing in the first place instead?


John


More information about the Python-win32 mailing list