自动化测试之WatiN(1)

1.WatiN的念法?

Wait IN

2.WatiN命名的由来?

WatiN=>Web Application Testing In .Net

3.WatiN的使用

1)下载WatiN http://sourceforge.net/projects/watin/files/

2)打开VS创建一个Console工程

3)添加对WatiN的引用(WatiN.Core.dll)

4)在代码中引用WatiN.Core

5)进行代码编写见范例

进行百度的查询

using System;

using WatiN.Core;//引用WatiN.Core的类库

namespace baidu

{

class Program
    {
        [STAThread]//特定符号需要加载上
        static void Main(string[] args)
{

     IE ie=new IE(http://www.baidu.com/);

     ie.TextFiled(Find.ByID("kw")).Vaule="abc";

     ie.Button(Find.ByID("su")).Click();

{

}

}

原文地址:https://www.cnblogs.com/mengxiao1001/p/2664092.html