摘要: 'strNodePath = "/soapenv:Envelope/soapenv:Body/getProductsResponse/transaction/queryProducts/queryProduct/keys/keyProducts/keyProduct/attrProduct/attr... 阅读全文
posted @ 2015-05-20 11:27 Ellie_Auto 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 1. 读取DataTable GetDataFromExcelByConn(bool hasTitle = false){ OpenFileDialog openFile = new OpenFileDialog(); openFile.Filter = "Excel(*.xlsx)|*.xlsx|... 阅读全文
posted @ 2015-05-18 17:37 Ellie_Auto 阅读(1166) 评论(0) 推荐(0) 编辑
摘要: 使用UI Automation实现自动化测试--5 (Winfrom和WPF中弹出和关闭对话框的不同处理方式)在使用UI Automation对Winform和WPF的程序测试中发现有一些不同的地方,而这些不同来自于Winform与WPF的处理机制不同。下面我们通过一个简单的实例来加以说明:实例描述... 阅读全文
posted @ 2015-04-15 22:55 Ellie_Auto 阅读(5322) 评论(0) 推荐(0) 编辑
摘要: IntroductionUI Automation是Microsoft .NET 3.0框架下提供的一种用于自动化测试的技术,是在MSAA基础上建立的,MSAA就是Microsoft Active Accessibility。UI Automation在某些方面超过了MSAA,UI自动化提供了Win... 阅读全文
posted @ 2015-04-14 23:39 Ellie_Auto 阅读(21810) 评论(1) 推荐(2) 编辑
摘要: Class QCImageErrorCapture Sub Class_Terminate() 'Check if the current test has failed. If failed then only capture screenshot If Reporter.RunStatus ... 阅读全文
posted @ 2015-04-14 17:22 Ellie_Auto 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Set WshShell=WScript.CreateObject("WScript.Shell")WshShell =SendKeys string“string”:表示要发送的按键指令字符串,需要放在英文双引号中。它包含如下内容:1.基本键:一般来说,要发送的按键指令都可以直接用该按键字符本身来... 阅读全文
posted @ 2015-03-26 17:35 Ellie_Auto 阅读(824) 评论(0) 推荐(0) 编辑
摘要: 1. set fs=wscript.createobject(“scripting.filesystemobject”)这样就建立了fso的模型。如果要释放的话也很简单,set fs=nothing2.注意:如果c:\data 和d:\data都存在,脚本会出错,复制也就会停止,如果要强制覆盖,使用... 阅读全文
posted @ 2015-03-26 17:28 Ellie_Auto 阅读(1887) 评论(0) 推荐(0) 编辑
摘要: Vbs中修改注册表的语句主要有:1、读注册表的关键词和值:可以通过把关键词的完整路径传递给wshshell对象的regread方法。例如:set ws=wscript.createobject("wscript.shell")v=ws.regread("HKEY_LOCAL_MACHINE\SOFT... 阅读全文
posted @ 2015-03-26 16:22 Ellie_Auto 阅读(1087) 评论(0) 推荐(0) 编辑
摘要: 1、最常见的错误是运行时错误,也就是说错误在脚本正在运行的时候发生,是脚本试图进行非法操作的结果。例如零被作为除数。在vbs中,任何运行时错误都是致命的,此时,脚本将停止运行,并在屏幕上显示一个错误消息。你可以在脚本的开头添加On Error Resume Next这行语句可以告诉vbs在运行时跳过... 阅读全文
posted @ 2015-03-26 16:09 Ellie_Auto 阅读(787) 评论(0) 推荐(0) 编辑
摘要: Set objShell = CreateObject(“Wscript.Shell”)objShell.Run “notepad”Objshell.run的意思就是调用Wscript.shell中的运行外部程序的函数——run,notepad是记事本程序的文件名。当然你也可以改成“calc”,这是... 阅读全文
posted @ 2015-03-26 15:56 Ellie_Auto 阅读(4092) 评论(0) 推荐(0) 编辑