Watin无法在我的TFS构建机器上运行

时间:2012-04-12 14:49:06

标签: internet-explorer tfs watin specflow

我一直试图让它工作一段时间,但我似乎无法在TFS上运行我的Watin测试。他们似乎在我的开发帐户上工作。

我有一个TFS用户在我的解决方案中运行所有测试。所有测试通过,但Watin测试失败。

我收到以下错误:

WatiN.Core.Exceptions.RunScriptException: RunScript failed ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

错误堆栈是:

mshtml.HTMLWindow2Class.IHTMLWindow2_execScript(String code, String language)
WatiN.Core.Native.InternetExplorer.IEUtils.RunScript(String scriptCode, String language, IHTMLWindow2 window)
WatiN.Core.Native.InternetExplorer.IEUtils.RunScript(String scriptCode, String language, IHTMLWindow2 window)
WatiN.Core.Native.InternetExplorer.IEElement.GetJavaScriptElementReference()
WatiN.Core.Native.InternetExplorer.IEFireEventHandler.CreateJavaScriptFireEventCode(NameValueCollection eventObjectProperties, String eventName)
WatiN.Core.Native.InternetExplorer.IEFireEventHandler.FireEvent(String eventName, NameValueCollection eventProperties, Boolean noWait)
WatiN.Core.Native.InternetExplorer.IEElement.FireEvent(String eventName, NameValueCollection eventProperties)
WatiN.Core.Element.FireEvent(String eventName, Boolean waitForComplete, NameValueCollection eventProperties)
WatiN.Core.Element.FireEvent(String eventName)
WatiN.Core.Element.Focus()
WatiN.Core.Actions.TypeTextAction.TypeAppendClearText(String value, Boolean append, Boolean clear)
WatiN.Core.Actions.TypeTextAction.TypeText(String value)
WatiN.Core.TextField.TypeText(String value)

关于从哪里开始寻找的任何想法?

1 个答案:

答案 0 :(得分:3)

确保构建服务设置为作为交互式流程运行,this blog帖子中的更多信息。它是关于Coded UI的,但它可能是相关的。

另外,请检查您的用户帐户是否具有运行交互式进程的权限(可以以其身份登录),并且不作为仅限服务的用户进行保护。

TFS build