在使用 IE 8 的 Windows 7 上运行 WatiN 时遇到问题

发布于 2024-08-16 21:56:28 字数 1216 浏览 4 评论 0原文

当我在带有 IE8 的 Windows 7 上运行任何 WatiN 测试时(请注意,所有测试都在带有 IE8 的 Vista 上通过),浏览器显示第一页,但不再继续。几秒钟后显示以下异常:

处 Internet Explorer 状态未完成时超时

WatiN.Core.Exceptions.TimeoutException:在 WatiN.Core.UtilityClasses.TryFuncUntilTimeOut.ThrowTimeOutException(Exception lastException, String message) 在 WatiN.Core.UtilityClasses.TryFuncUntilTimeOut.HandleTimeOut() 在 WatiN.Core.UtilityClasses.TryFuncUntilTimeOut.Try(DoFunc1 func) 在 WatiN.Core.WaitForCompleteBase.WaitUntil(DoFunc1 waitWhile,BuildTimeOutExceptionMessage 异常消息) 在 WatiN.Core.Native.InternetExplorer.WaitForComplete.WaitWhileIEReadyStateNotComplete(IWebBrowser2 即) 在 WatiN.Core.Native.InternetExplorer.IEWaitForComplete.DoWait() 在 WatiN.Core.DomContainer.WaitForComplete(IWait waitForComplete) 在 WatiN.Core.IE.WaitForComplete(Int32 waitForCompleteTimeOut) 在 WatiN.Core.DomContainer.WaitForComplete() 在 WatiN.Core.Browser.GoTo(Uri url) 在 WatiN.Core.IE.FinishInitialization(Uri uri) 在 WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri,IDialogHandler logonDialogHandler,布尔 createInNewProcess) 在 WatiN.Core.IE..ctor(字符串 url) 在 Tests.cs 中的 CCS.iPS.ST.Tests.UIWithDBVerification.Tests.DCC_Offered_Completed_ThreeDS_And_Authorization_Completed() 处:第 18 行

When I run any WatiN test on Windows 7 with IE8(note that all tests pass on Vista with IE8), the browser displays the first page but does not go any further. The following exception is displayed after a few seconds:

WatiN.Core.Exceptions.TimeoutException: Timeout while Internet Explorer state not complete

at WatiN.Core.UtilityClasses.TryFuncUntilTimeOut.ThrowTimeOutException(Exception lastException, String message)
at WatiN.Core.UtilityClasses.TryFuncUntilTimeOut.HandleTimeOut()
at WatiN.Core.UtilityClasses.TryFuncUntilTimeOut.Try(DoFunc1 func)
at WatiN.Core.WaitForCompleteBase.WaitUntil(DoFunc
1 waitWhile, BuildTimeOutExceptionMessage exceptionMessage)
at WatiN.Core.Native.InternetExplorer.WaitForComplete.WaitWhileIEReadyStateNotComplete(IWebBrowser2 ie)
at WatiN.Core.Native.InternetExplorer.IEWaitForComplete.DoWait()
at WatiN.Core.DomContainer.WaitForComplete(IWait waitForComplete)
at WatiN.Core.IE.WaitForComplete(Int32 waitForCompleteTimeOut)
at WatiN.Core.DomContainer.WaitForComplete()
at WatiN.Core.Browser.GoTo(Uri url)
at WatiN.Core.IE.FinishInitialization(Uri uri)
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler, Boolean createInNewProcess)
at WatiN.Core.IE..ctor(String url)
at CCS.iPS.ST.Tests.UIWithDBVerification.Tests.DCC_Offered_Completed_ThreeDS_And_Authorisation_Completed() in Tests.cs: line 18

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤千羽 2024-08-23 21:56:28

确保您以管理员身份运行。似乎是一个问题,除非应用程序以系统管理员权限运行,否则 Watin 无法访问 IE 中的 DOM。

Make sure you are running as an Administrator. Seems to be an issue where Watin can't access the DOM in IE unless the application is running with System Administrator privileges.

梦开始←不甜 2024-08-23 21:56:28

我知道这是一个古老的线程,但我发现在 Windows 7 下找到了 WatiN 的解决方法,不需要您以管理员身份运行(我的公司不允许:S)如果您在Internet Explorer 应该可以正常运行:-

1 - Open internet explorer.
2 - Click on Tools menu and select Internet Options.
3 - Select Security Tab in the Internet options windows.
4 - Select Internet from the zone settings.
5 - Uncheck Enable Protected Mode option to disable the protection from Security for this zone.
6 - Hit Apply and Ok

I know this is an ancient thread, but I've found found a workaround for WatiN under Windows 7 that doesn't require you to run as an administrator (which isn't allowed in my company :S) If you disable protected mode in Internet Explorer it should run fine: -

1 - Open internet explorer.
2 - Click on Tools menu and select Internet Options.
3 - Select Security Tab in the Internet options windows.
4 - Select Internet from the zone settings.
5 - Uncheck Enable Protected Mode option to disable the protection from Security for this zone.
6 - Hit Apply and Ok
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文