在使用 IE 8 的 Windows 7 上运行 WatiN 时遇到问题
当我在带有 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(DoFunc
1 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)
1 waitWhile, BuildTimeOutExceptionMessage exceptionMessage)
at WatiN.Core.WaitForCompleteBase.WaitUntil(DoFunc
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保您以管理员身份运行。似乎是一个问题,除非应用程序以系统管理员权限运行,否则 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.
我知道这是一个古老的线程,但我发现在 Windows 7 下找到了 WatiN 的解决方法,不需要您以管理员身份运行(我的公司不允许:S)如果您在Internet Explorer 应该可以正常运行:-
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: -