测试共享,雁过留痕

[转][总结]QTP Timeout Settings

上一篇 / 下一篇  2008-07-26 13:12:15 / 个人分类:QTP

1.     Object Sync Timeout:这是QTP在等待一个对象显示的时间

具体设置方法: Test Settings, Run Tab, the “Object Synchronization timeout:” setting.

!eT0qnZo.j&Rw1p0

请注意在8.x版本中单位是毫秒,而在9.x就变成秒了。

;Q3Hlfy0

程序中设置: Setting(“DefaultTimeout”) [=milliseconds]
3b#K:hn2||u0
z2{7pv J'r d"G02.Browser Navigation Timeout
帮助里这样定义“sets the maximum time (in seconds) that QuickTest waits for a Web page to load before running a step in the test”.那和上面的Object Sync Timeout setting有什么区别的,MI没有说,我猜想是在测试一个显示很缓慢的页面的时候使用吧。针对Navigation而不是一个对,从脚本看:

c(XyjFX)AHM^^0

Browser(“Browser”).Page(“Page”).WebRadioGroup(“Name:=txt_Name”,”html tag:=INPUT”).set “Test”51Testing软件测试网!v E)wXZ8k8Km f

这可能是一开始Browser的等待时间吧。

-t(C%bF6m:sMe i0

具体设置方法: Test Settings, Web tab, “Browser navigation timeout:” X “seconds”51Testing软件测试网"_J)gW#S
51Testing软件测试网;zg9kyZx@'a
在程序中怎么实现还没有解决,谁可以帮助我?51Testing软件测试网%Z,A9V `(E J _,l5W6I1G

s,I!J,j5C03.Default Load Time
QTP help这样定义Instructs QuickTest to add a specified number of seconds to the page load time property specified in each Page checkpoint.”.很迷惑,按照帮助的理解就是检查点额外的等待时间,过了这个时间再没有出现检查的数据可能就会返回错误了。
&H6lcnm;BS)rg E0
具体设置方法: Options, Web Tab, “Add” x “seconds to page load time”
zav)ch8Q1b0
程序中设置: Setting(“DefaultLoadTime”) [=seconds]
1B8~h(T T4eM051Testing软件测试网*{GG3uA\
4.Activate Window
定义“specifies the time (in tenths of a second) that QuickTest waits before it sets the focus on an application window when using the pointing hand to point to an object in the application (for Object Spy, checkpoints, Step Generator, Recovery Scenario Wizard, and so forth)”.我一直使用的默认的值,挺好的。呵呵。51Testing软件测试网$Y(C(m P4C
具体设置方法: Options, General tab, “When pointing at a window, activate it after” X “tenths of a second”
y V(XH;_1Z0
程序中设置,暂无。
7VTsIy0
O$i:?qB VM+H,`U05..Exists(Timeout)
用的是毫秒作为单位.51Testing软件测试网&r2En;hj&zs
51Testing软件测试网7@a#I_&mA
6. .WaitProperty(x, y, Timeout)
用的是毫秒作为单位.51Testing软件测试网AY5g[#L
51Testing软件测试网 N(].Q#r5Gc N"|
7.Wait seconds [, milliseconds]
51Testing软件测试网FwqNay5h]v

这个就是我们经常用的wait,不过后面可以选择毫秒可能有的人就不知道了。

.F B k D G.I+~C-j8S0

 

-tz_ P5nI*O0

 

.rOJ7H6JXlM!k0

以上是我总结的一些QTP关于时间的设置的,很多概念自己也不算清楚,希望和大家一起在学习中进步。

E8n&]'J+`%[ z0

TAG: QTP

 

评分:0

我来说两句

Open Toolbar