New Instructions from Supervisor
上一篇 / 下一篇 2007-05-26 03:54:34 / 天气: 热 / 心情: 平静 / 个人分类:日记
相关阅读:
- (转)QTP中读取Access数据 (erics, 2007-5-24)
- 工作项目经验-QTP脚本 (jimmy2006.hi, 2007-5-24)
- QTP中的描述性编程 (erics, 2007-5-24)
- (Quote)QTP中的descriptive programming (erics, 2007-5-24)
- [Quote]QTP Timeout Settings (erics, 2007-5-24)
- [Quote]QTP学习的一些技巧 (erics, 2007-5-24)
- SetTOProperty (jimmy2006.hi, 2007-5-24)
- 备忘 (jimmy2006.hi, 2007-5-25)
- 修改QTP脚本时,如何抓取到新的页面镜像? (wuzhuayu, 2007-5-25)
- 系统变量 导致 TD 调用 QTP 失败 (higkoo, 2007-5-25)
TAG: test QTP WinRunner 日记 script job thought
- 引用 删除 howard / 2007-11-14 00:34:40
-
Later someone figured it out why the execution of the QTP scrīpts was so slow. The scripts were using descriptive programming. The majority of the statements are like this,
SwfWindow("name:=MdiWinRLS").SwfWindow("name:=FrmSyparm").SwfEdit("name:=dfSystemId").SetFocus
SwfWindow("name:=MdiWinRLS").SwfWindow("name:=FrmSyparm").SwfEdit("name:=dfSystemId").Set "8006"
SwfWindow("name:=MdiWinRLS").SwfWindow("name:=FrmSyparm").SwfEdit("name:=dfBranchID").SetFocus
SwfWindow("name:=MdiWinRLS").SwfWindow("name:=FrmSyparm").SwfEdit("name:=dfBranchID").Set "0"
The structure made QTP spend lots of time to identify the objects deep to 3 layers over and over for EACH statement.
Now, they use "with" statement to dramatically improve the speed. For example, change the above statements into something like this,
With SwfWindow("name:=MdiWinRLS").SwfWindow("name:=FrmSyparm")
.SwfEdit("name:=dfSystemId").SetFocus
.SwfEdit("name:=dfSystemId").Set "8006"
.SwfEdit("name:=dfBranchID").SetFocus
.SwfEdit("name:=dfBranchID").Set "0"
End With