简体   繁体   English

如何为每个Web浏览器控件使用IE(或不同的浏览器)?

[英]how can i use IE (or different browser) for each webbrowser controle?

i want to use different browsers for my webbrowser controls in c#.NET. 我想对c#.NET中的Web浏览器控件使用不同的浏览器。 for example, if im log into facebook from the webbrowser1, i will not in the webbrowser2 例如,如果我从webbrowser1登录到Facebook,我将不在webbrowser2中

if i cant use ie different for each webbrowser... can i separate cookies for each webbrowser control? 如果我不能为每个Web浏览器使用不同的IE,那么...我可以为每个Web浏览器控件单独设置Cookie吗? for example, if i navigate using the first controle 例如,如果我使用第一个控件导航

    webbrowser1.navigate("this is not important");

then submit the login form 然后提交登录表格

webbrowser1.document.getelem..... click

thats will not applicated on the secod control( webbrowser2) 多数民众赞成在第二个控件上将不会应用(webbrowser2)

- --

i hope you inderstand what i want :) 我希望你理解我想要的是什么:)

The WebBrowser control is a wrapper around IE and will always and only use IE. WebBrowser控件是IE的包装,并且将始终且仅使用IE。 It's never going to use Firefox or Chrome etc. Some browsers apart from IE may allow Automation, but you'll have to check their documentation. 它永远不会使用Firefox或Chrome等。除了IE之外,某些浏览器可能允许使用Automation,但是您必须检查其文档。

In your two lines of code, both are using the control called webbrowser1, so the Navigate and getelement will always go to the control. 在您的两行代码中,两者都使用了名为webbrowser1的控件,因此,导航和getelement将始终转到该控件。 If you want to use two browser instances, you need to have 2 controls. 如果要使用两个浏览器实例,则需要具有2个控件。

I don't clearly understand what your question is. 我不清楚您的问题是什么。 The two points above are what I can answer. 以上两点是我能回答的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM