随笔分类 -  测试自动化

摘要:using System;using System.Collections.Generic;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Windows.Automation;using System.Threading;namespace UIANotepad{ class NotepadAutomationDemo { static AutomationElement notepadWin = null; s 阅读全文
posted @ 2011-01-14 10:45 Luke Zhang 阅读(741) 评论(1) 推荐(1)
摘要:using System;using System.Collections.Generic;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Windows.Automation;using System.Threading;namespace UIANotepad{ class NotepadAutomationDemo { static AutomationElement notepadWin = null; s 阅读全文
posted @ 2011-01-14 10:31 Luke Zhang 阅读(687) 评论(0) 推荐(0)
摘要:可以用一个dictionary来保存找到的控件;其中String记录找到控件的full-path name;对于从根目录搜索的控件的full-path name的写法,可以借用*。控件搜索可以分为按AutomationID搜索,和按Name搜索;但是如果组合AutomationID和Name进行搜索,效果会更好; 阅读全文
posted @ 2011-01-07 21:08 Luke Zhang 阅读(759) 评论(0) 推荐(0)
摘要:我所认为的应该遵循的设计原则: 1、 将控件的查找和操作分开; 2、 暂时保存查找到的控件,以备子控件查找或者属性获取; 3、 能够步进查找的控件一定不要从根目录查找;弹出对话框则应该从根目录findall + descendants 查找; 阅读全文
posted @ 2011-01-06 11:44 Luke Zhang 阅读(491) 评论(0) 推荐(0)