separate IE instances?

J Correia correiajREMOVECAPS at hotmail.com
Mon Jun 6 23:48:39 EDT 2005


"Chris Curvey" <ccurvey at gmail.com> wrote in message
news:1118102755.309346.169810 at g14g2000cwa.googlegroups.com...
> I need to create a set of IE instances that have different sets of
> session cookies.  I thought that using the win32com.DispatchEx function
> would do this, but it doesn't seem to.  In other words
>
> ie1 = win32com.DispatchEx("InternetExplorer.Application")
> ie2 = win32com.DispatchEx("InternetExplorer.Application")
>
> gives me two IE windows, but only one IEXPLORE process in Task Manager.
>  And if I login to a site that uses session cookies to track sessions
> using ie1, when I move ie2 to the same site, ie2 is already logged in.
>
> Any help appreciated.
>
> -Chris

from win32com.client import Dispatch

ie1 = pythoncom.CoCreateInstance("InternetExplorer.Application", None,\
                     pythoncom.CLSCTX_SERVER,
                     pythoncom.IID_IDispatch)
ie1 = Dispatch(ie1)
ie2 = pythoncom.CoCreateInstance("InternetExplorer.Application", None,\
                     pythoncom.CLSCTX_SERVER,
                     pythoncom.IID_IDispatch)
ie2 = Dispatch(ie2)
.
.
.






More information about the Python-list mailing list