带有Webbrowser控件的Watin给出了超时错误 [英] watin with webbrowser control gives timeout error
本文介绍了带有Webbrowser控件的Watin给出了超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用带有Webbrowser控件的watin,在vs2008的vista上使用了watin,它给出了超时异常,我需要在嵌入式浏览器中使用watin,请您能提供同样的帮助,我已经将该网站添加到了信任区域,如上所述在以上文章中. 这是我的代码.
i am using watin with webbrowser control, on vista with vs2008, its giving timeout exception, i need to use watin with embedded browser, please can you provide help regarding the same, i have added the site to trust zone, as mentioned in the above article. here is my code.
var t = new Thread(() =>
{
Settings.AutoStartDialogWatcher = false;
var ie = new IE(webBrowser1.ActiveXInstance);
try
{
ie.GoTo("http://www.google.com/");
}
catch (Exception) { }
});
t.SetApartmentState(ApartmentState.STA);
t.Start();
推荐答案
您Thread.Sleep(timein miliseocnds);
you Thread.Sleep(timein miliseocnds);
在网络浏览器中等待
这篇关于带有Webbrowser控件的Watin给出了超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文