单独的IE实例? [英] separate IE instances?

查看:66
本文介绍了单独的IE实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一组具有不同

会话cookie的IE实例。我认为使用win32com.DispatchEx函数

会这样做,但它似乎没有。换句话说


ie1 = win32com.DispatchEx(" InternetExplorer.Application")

ie2 = win32com.DispatchEx(" InternetExplorer.Application")


给了我两个IE窗口,但在任务管理器中只有一个IEXPLORE进程。

如果我登录到使用会话cookie跟踪会话的网站

使用ie1,当我将ie2移动到同一个站点时,ie2已经登录。


任何帮助表示赞赏。


-Chris

解决方案

" Chris Curvey" < CC ***** @ gmail.com>在消息中写道

news:11 ********************** @ g14g2000cwa.googlegr oups.com ...

我需要创建一组具有不同会话cookie集的IE实例。我认为使用win32com.DispatchEx函数
会做到这一点,但似乎并没有。换句话说

ie1 = win32com.DispatchEx(" InternetExplorer.Application")
ie2 = win32com.DispatchEx(" InternetExplorer.Application")

给出我有两个IE窗口,但在任务管理器中只有一个IEXPLORE进程。
如果我使用会话cookie登录使用会话cookie跟踪会话
,当我将ie2移动到同一个站点时,ie2是已登录。

任何帮助表示赞赏。

-Chris




来自win32com.client import Dispatch


ie1 = pythoncom.CoCreateInstance(" InternetExplorer.Appli cation",None,\

pythoncom.CLSCTX_SERVER,

pythoncom。 IID_IDispatch)

ie1 = Dispatch(ie1)

ie2 = pythoncom.CoCreateInstance(" InternetExplorer.Appli cation",None,\

pythoncom.CLSCTX_SERVER,

pythoncom.IID_IDispatch)

ie2 =派遣(ie2)

..

..

..


无赖。完全没有变化。 (事实上​​,我甚至不能在不抛出错误的情况下调用Navigate()

)。我在win2k,如果这有任何区别。


Chris Curvey写道:

Bummer。完全没有变化。 (事实上​​,我甚至无法调用Navigate()
而不会抛出错误)。我在win2k,如果这有任何区别。



我可能会离开,但是不是那些操作系统的窗户之一br />
允许你有两个IEXPORE.EXE实例运行IOW操作系统是
阻止你运行这个可执行文件的两个实例。有人对b / b
了解更多关于Windows内部的知识我肯定会来

并纠正我;-)


Mart


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

解决方案

"Chris Curvey" <cc*****@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.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.Appli cation", None,\
pythoncom.CLSCTX_SERVER,
pythoncom.IID_IDispatch)
ie1 = Dispatch(ie1)
ie2 = pythoncom.CoCreateInstance("InternetExplorer.Appli cation", None,\
pythoncom.CLSCTX_SERVER,
pythoncom.IID_IDispatch)
ie2 = Dispatch(ie2)
..
..
..


Bummer. No change at all. (In fact, I can''t even call Navigate()
without throwing an error). I''m on win2k, if that makes any difference.


Chris Curvey wrote:

Bummer. No change at all. (In fact, I can''t even call Navigate()
without throwing an error). I''m on win2k, if that makes any difference.


I could be way off, but isn''t windows one of those OS''s that doesn''t
allow you to have two instances of IEXPORE.EXE running IOW the OS is
preventing you from running two instances of this executable. Someone
with a lot more knowledge of windows internals will I''m sure come along
and correct me ;-)

Mart


这篇关于单独的IE实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆