【问题标题】:Watin does not work on my TFS build machineWatin 在我的 TFS 构建机器上不起作用
【发布时间】:2012-04-24 22:42:35
【问题描述】:

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

我有一个 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)

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

【问题讨论】:

    标签: internet-explorer tfs watin specflow


    【解决方案1】:

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

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

    【讨论】:

    • 我收到以下错误:“工作文件夹 d:\Build\1\MyProject\Watin Test\Sources 已被工作区 8_1_appsdev_build 使用;计算机 BUILD_MACHINE 上的域\BUILD_MACHINE$。”知道为什么会出现错误吗?所有用户都从构建机器中注销。
    • 这应该是另一个问题,但是... 以构建服务器运行的帐户登录到您的构建服务器,然后打开 VS。 File->Source Control->Workspaces 并删除你上面提到的那个。
    猜你喜欢
    • 2023-04-11
    • 2014-07-15
    • 1970-01-01
    • 2011-12-07
    • 2012-03-09
    • 2011-12-28
    • 1970-01-01
    • 2013-01-01
    • 2012-04-16
    相关资源
    最近更新 更多