在带有 IE 8 的 Windows 7 上运行 WatiN 时遇到问题 [英] Having problems running WatiN on Windows 7 with IE 8

查看:33
本文介绍了在带有 IE 8 的 Windows 7 上运行 WatiN 时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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:Internet Explorer 状态未完成时超时

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

在 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 exceptionMessage)在 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, Boolean createInNewProcess)在 WatiN.Core.IE..ctor(String url)在 CCS.iPS.ST.Tests.UIWithDBVerification.Tests.DCC_Offered_Completed_ThreeDS_And_Authorisation_Completed() 在 Tests.cs:第 18 行

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(DoFunc1 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

推荐答案

确保您以管理员身份运行.似乎是一个问题,除非应用程序以系统管理员权限运行,否则 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.

这篇关于在带有 IE 8 的 Windows 7 上运行 WatiN 时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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