【发布时间】:2012-11-02 03:28:29
【问题描述】:
我运行一个非常简单的 watin 控制台应用程序,如下所示
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WatiN.Core;
namespace ConsoleApplication2
{
class Program
{
[STAThread]
static void Main(string[] args)
{
IE ie = new IE();
// point it to http://www.google.com
ie.GoTo("http://www.google.com");
// fill the search box
ie.TextField(Find.ByName("q")).TypeText("WatiN");
// performs click event
ie.Button(Find.ByValue("Google Search")).Click();
}
}
}
这不起作用。弹出窗口说缺少.exe 文件。我无法理解,因为它只是一个控制台应用程序。为什么我需要.exe 文件?
【问题讨论】:
-
"visual studio 无法开始调试,因为缺少调试目标 D:\....\consoleapplication1.exe。请构建项目并重试或将输出路径和 AssemblyName 属性设置为适当指向在目标程序集的正确位置"
-
非常感谢,在我将目标 .net 框架从 4.0 更改为 3.5 后它可以工作。真是奇迹
标签: c# watin missing-features