【问题标题】:AutoIt Script using Nunit使用 Nunit 的 AutoIt 脚本
【发布时间】:2016-09-14 03:46:02
【问题描述】:

通过 Visual Studio (Selenium-C#) 运行我的脚本时,我用于打开对话框的 AutoIt 脚本运行良好,但是从 Nunit(.Net) 客户端运行相同的脚本时,相同的测试失败,出现以下错误:

ReportAppeal.MainTestRunner.OpenFile("Email"):
System.Runtime.InteropServices.COMException : Retrieving the COM class factory for component with CLSID {1A671297-FA74-4422-80FA-6C5D8CE4DE04} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

我做错了什么?

【问题讨论】:

    标签: c# selenium autoit


    【解决方案1】:

    好的解决方案是:

    1. 打开 regedit*32 (c:\windows\syswow64\regedit)
    2. HKEY_CLASSES_ROOT\AppID 中搜索 AutoItX
      我在HKEY_CLASSES_ROOT\AppID{6E8109C4-F369-415D-AF9A-2AEEFF313234} 找到它
    3. 创建一个名为DllSurrogate 的空白REG_SZ(字符串)条目

    由于某种原因,这完全解决了问题。 在 Windows 7 - 64bit 中工作

    参考:
    How to use a 32 bit COM object on Windows Server 2008 (works on 2008 R2 but non 2008)

    【讨论】:

      猜你喜欢
      • 2014-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-23
      • 2023-03-13
      相关资源
      最近更新 更多