我想要做快速入門的例子,我在VS2010中使用NuGet引用了參考文獻,我在網頁上刮取了示例代碼,我看到了NUnit會話窗口,我點擊了綠色箭頭,但是瀏覽器不會被調用(不會啓動)。我錯過了什麼?Watin入門
using System;
using NUnit.Framework;
using WatiN.Core;
namespace FirstWatinProject
{
[TestFixture]
public class Class1
{
[Test]
[STAThread]
public void SearchForWatiNOnGoogle()
{
using (var browser = new IE("http://www.google.com"))
{
browser.TextField(Find.ByName("q")).TypeText("WatiN");
browser.Button(Find.ByName("btnK")).Click();
Assert.IsTrue(browser.ContainsText("WatiN"));
}
}
}
}
我在NUnit會話窗口中收到以下錯誤;
SearchForWaitOnGoogle失敗的信息:System.IO.FileNotFoundException:可能 無法加載文件或程序集Interop.SHDocVw,版本= 1.1.0.0, 文化=中性等等
不要忘記接受你的答案:P – Boaz 2012-01-06 22:45:49