[python-win32] Internet Explorer Session independent Creation
Romain Gilles
romain.gilles at gmail.com
Thu Dec 18 15:31:56 CET 2008
I have exactly the same idea. But I was not able to retrieve the IE
instance. So I will try your solution.
Thanks,
Romain.
2008/12/18 Michel Claveau <mc at mclaveau.com>
> Hi!
>
> A way is to launch separate instance, then connect to instances.
> Example:
>
>
> import os,time,win32com.client
>
> def finstance(url):
> for instance in
> win32com.client.Dispatch('{9BA05972-F6A8-11CF-A442-00A0C90A8F39}'):
> if instance.LocationURL.find(url)>-1:
> return instance
>
> os.startfile('http://www.google.fr')
> time.sleep(2)
> os.system('start "" "C:\\Program Files\\Internet Explorer\\iexplore.exe"
> http://www.mclaveau.com/batch')
> time.sleep(3)
>
> ie1 = finstance('http://www.google.fr')
> ie1.Left=10
> ie1.Top=10
> ie1.Width=600
> ie1.Height=700
>
> ie2 = finstance('http://www.mclaveau.com/batch')
> ie2.Left=610
> ie2.Top=10
> ie2.Width=600
> ie2.Height=700
>
> time.sleep(2)
>
>
>
>
> @-salutations
> --
> Michel Claveau
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20081218/08e7429e/attachment.htm>
More information about the python-win32
mailing list