【问题标题】:Is it possible to use WatiN 2.1 with MvcContrib.WatiN?是否可以将 WatiN 2.1 与 MvcContrib.WatiN 一起使用?
【发布时间】:2011-07-27 21:09:01
【问题描述】:

在 WatiN 1.3 中,IE 对象构造函数在我的机器上引发异常。见this question

WatiN 2.1 没有同样的问题。但是,我使用的 MvcContrib.WatiN 似乎依赖于 WatiN 1.3。是否可以在 MvcContrib 中使用 WatiN 2.1 而不是 1.3?如果是这样,怎么做? WatiN 1.3 是一个非常旧的版本。

【问题讨论】:

    标签: watin mvccontrib


    【解决方案1】:

    不适用于当前的 MvcContrib 版本。但由于它是开源的,你总是可以自己做腿部工作以使其工作。您必须获取最新的 MvcContrib 源代码 here 并修改 MvcContrib.TestHelper.WatiN 项目上的 WatiN.Core 引用以使用 WatiN.Core.dll v2.1。然后重新编译 MvcContrib.TestHelper.WatiN(在你的项目中使用这个新编译的 dll)。

    一个警告:您必须稍微修改 JavaScriptExecutor.GetWindow()(在 MvcContrib.TestHelper.WatiN 命名空间内)才能重新编译它。 WatiN 2.1 在 Document 中不再有 HtmlDocument 类(不确定该逻辑去了哪里)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-12
      • 2016-04-01
      • 2011-01-20
      • 2018-08-11
      • 2021-08-05
      • 2019-03-18
      • 2014-03-15
      相关资源
      最近更新 更多