|
本帖最后由 漂流瓶 于 2010-6-10 19:47 编辑
下面这个例子向您展示几个最基本的操作. 打开浏览器 -> 浏览google.com -> 在输入框中输入"shrinerain autotester" -> 点击"Google Search"按钮.- using System;
- using System.Collections.Generic;
- using System.Text;
- using Shrinerain.AutoTester.Core;
- using Shrinerain.AutoTester.HTMLUtility;
- namespace AutoTesterTest
- {
- class Program
- {
- [STAThread]
- static void Main(string[] args)
- {
- HTMLTestSession ts =new HTMLTestSession();
- ts.Browser.Start();//start browser
- ts.Browser.Load("google.com",true);//load google.com, wait until finish.
- ts.Objects.TextBox().Input("AutoTester shrinerain");//input something.
- ts.Objects.Button("Google Search").Click();//click search button.
- }
- }
- }
复制代码
 |
|