上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: 假设一个Test按顺序关联了Lib1,Lib2,Lib3Lib1:Msgbox "Lib1"Lib2:Option Explicit OnX = 2Lib3:Msgbox X执行时QTP会按照Lib3,Lib2,Lib1的顺序组合执行, 而且Option Explicit只有在组合后的第一个库中才生效, 也就是在Lib3中的Option Explicit才能生效 阅读全文
posted @ 2012-07-10 20:35 dushuai 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Function GetObjectClass(ByVal LogicalName)GetObjectClass = ""Dim arrTypesarrTypes = Array("Browser", "Window", "Dialog", "JavaWindow")On Error Resume NextFor each sType in arrTypesErr.ClearSet TempObj = Eval(sType & "(" & LogicalNam 阅读全文
posted @ 2012-07-09 14:35 dushuai 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 第一种方法:Dim iCount, iFoundiCount = 0iFound = 0iFound = inStr(iFound + 1, mainStr, subStr)While iFound <> 0iCount = iCount + 1iFound = InStr(iFound + 1, mainStr, subStr)Wend第二种方法: iCount = UBound(Split(mainStr, subStr))第三种方法: iCount = (Len(mainStr) - Len(Replace(mainStr, subStr, ""))) / 阅读全文
posted @ 2012-07-09 14:25 dushuai 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1. QTP store OR in binary format which makes it impossible for others to create tools that can help make OR creation easier2. Shared OR can be shared across Tests. But it can't be edited by multiple users at the same time. Shared OR are not like shared excel files where multiple users can update 阅读全文
posted @ 2012-07-09 14:16 dushuai 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1.Msgbox Browser("百度一下,你就知道").Page("百度一下,你就知道").WebEdit("wd").GetROProperty("attribute/Start")2.Browser("百度一下,你就知道").Page("百度一下,你就知道").WebEdit("wd").CheckProperty "attribute/Start","fileopen"3.Browser("百度一 阅读全文
posted @ 2012-07-08 18:03 dushuai 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Const micLong = 3Const micString = 8Const micRef = 32768Const BN_CLICK = 245Set oExtern = CreateObject("Mercury.ExternObj")oExtern.Declare micLong,"FindWindow","user32.dll","FindWindowA",micString,micStringoExtern.Declare micLong,"FindWindowEx"," 阅读全文
posted @ 2012-07-08 17:39 dushuai 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Reporter.Filter = rfDisableAll 阅读全文
posted @ 2012-07-06 10:38 dushuai 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Page("title:=.*Google.*").Exist(0)Page("title:=.*Google.*").WebEdit("name:=q").Exist(0)在QTP版本大于9.5时,以上不会报错 阅读全文
posted @ 2012-07-06 08:00 dushuai 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 1. 在测试环境, 请开发把image换成固定image2. 在测试环境, 请开发加个tag到Captcha text3. 请开发给出将image解码为text的算法 阅读全文
posted @ 2012-07-05 22:05 dushuai 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 将recovery scenario setting设置为"Never", 在代码中需要启动recovery scenario的地方使用recovery.activate方法 阅读全文
posted @ 2012-07-05 21:27 dushuai 阅读(122) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页