升级到IE9后,WatiN BrowserNotFoundException [英] WatiN BrowserNotFoundException after upgrading to IE9

查看:237
本文介绍了升级到IE9后,WatiN BrowserNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将我的x64 Windows 7计算机升级到IE9,现在WatiN在执行类似操作时抛出BrowserNotFoundException:

I just upgraded my x64 Windows 7 machine to IE9 and now WatiN is throwing a BrowserNotFoundException when I do something like:

IE ie = new IE(true);
ie.GoTo("http://google.com");

我正在使用WatiN 2.1和SourceForge的最新代码.我正在运行的IE9的确切版本是9.0.5.该浏览器窗口实际上启动为"about:blank",但是WatiN无法找到新启动的浏览器. WatiN似乎通过将启动的iexplore.exe进程的主窗口句柄与使用本机COM方法找到的浏览器的主窗口句柄进行比较来找到新启动的浏览器.

I am using WatiN 2.1 and the latest code from SourceForge. The exact version of IE9 I'm running is 9.0.5. The browser window actually launches to "about:blank" but WatiN fails to find the newly launched browser. It appears WatiN finds the newly launched browser by comparing the main window handle of the launched iexplore.exe process to the main window handle of the browsers it finds using the native COM methods.

我需要对IE 9进行任何特殊设置以使其与WatiN一起使用吗?我曾尝试将WatiN更改为在没有附加组件的情况下启动,但这也不起作用.任何想法都将不胜感激.

Is there any special setup I need to do with IE 9 to make it work with WatiN? I've tried changing WatiN to launch without add-ons and that didn't work either. Any ideas are greatly appreciated.

推荐答案

不久前,我遇到了类似的问题,并且可以通过更改IE9设置来解决此问题.我发现倾向于破坏WatiN的主要内容是兼容模式和保护模式.关闭这些.对于保护模式,必须为每个安全级别将其关闭. 不知道这是否是问题,但我想以防万一!

I had a similar issue a little while back and was able to solve it by changing my IE9 settings. The main things I find that tend to break WatiN are compatibility mode and protected mode. Turn these off. For Protected mode you have to turn it off for each security level. Not sure if this is the issue but thought I should mention it just in case!

这篇关于升级到IE9后,WatiN BrowserNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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