关于WatiN的web小测试

看似疯癫 2014-02-28 08:23:51
源码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using WatiN.Core;
using System.Threading;
class Program
{
[STAThread]
static void Main(string[] args)
{
IE ie = new IE("http://i.qq.com/", true);
ie.TextField(Find.ByName("wd")).TypeText("csdn");//不可行
//ie.TextField(Find.ById("kw1")).TypeText("csdn");//可行
ie.Button(Find.ByValue("百度一下")).Click();
}
}
为何ByName的不行,用来测试Google则都可以,测试i.qq.com则都不行,求解?

...全文
61 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

110,566

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧