• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






Linford Xu

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2013年7月15日

使用UI Automation实现自动化测试--1
摘要: Introduction UI Automation是Microsoft .NET 3.0框架下提供的一种用于自动化测试的技术,是在MSAA基础上建立的,MSAA就是Microsoft Active Accessibility。UI Automation在某些方面超过了MSAA,UI自动化提供了Windows Vista中,微软Windows XP的全部功能,和Windows Server 2003。 在UI Automation中,所有的窗体、控件都表现为一个AutomationElement, AutomationElement 中包含此控件或窗体的属性,在实现自动化的过程中,我们通过.. 阅读全文
posted @ 2013-07-15 17:24 Linford Xu 阅读(701) 评论(0) 推荐(0)
 
使用UI Automation实现自动化测试--2
摘要: 1. 首先建立一个待测试的winform程序,即UI Automation的服务端。下面是button事件处理程序。 private void CalculateButton_Click(object sender, EventArgs e) { int num1 = 0; int num2 = 0; if (!int.TryParse(textBox1.Text.Trim(), out num1) || !int.TryParse(textBox2.Text.Trim(), out num2)) ... 阅读全文
posted @ 2013-07-15 17:18 Linford Xu 阅读(914) 评论(0) 推荐(0)