使用UIAutomation自动化测试

参考链接:

http://wenku.baidu.com/view/05b0c4886529647d272852b8.html###

code:

using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NUnit.Framework; 
using White.Core; 
using White.Core.UIItems.WindowItems; 
using White.Core.Factory; 
using White.Core.UIItems; 
using White.Core.UIItems.Finders; 

namespace spy_test_4
{
     [TestClass] 
public class Calculator
     {
         [TestMethod] 
         public void calc()
         {             
             Application calcapp = Application.Launch("calc.exe");
             Window calcwindow = calcapp.GetWindow("计算器", InitializeOption.NoCache);
             Button two = calcwindow.Get

你可能感兴趣的:(使用UIAutomation自动化测试)