[转]QTP Timeout Settings

上一篇 / 下一篇  2010-06-12 20:54:39 / 个人分类:QTP

转自风过无息的blog:http://www.51testing.com/?3528/action_viewspace_itemid_10029.html

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

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

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

程序中设置: Setting(“DefaultTimeout”) [=milliseconds]

2.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而不是一个对,从脚本看:

Browser(“Browser”).Page(“Page”).WebRadioGroup(“Name:=txt_Name”,”html tag:=INPUT”).set “Test”

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

具体设置方法: Test Settings, Web tab, “Browser navigation timeout:” X “seconds”

在程序中怎么实现还没有解决,谁可以帮助我?

3.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.”.很迷惑,按照帮助的理解就是检查点额外的等待时间,过了这个时间再没有出现检查的数据可能就会返回错误了。
具体设置方法: Options, Web Tab, “Add” x “seconds to page load time”
程序中设置: Setting(“DefaultLoadTime”) [=seconds]

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)”.我一直使用的默认的值,挺好的。呵呵。
具体设置方法: Options, General tab, “When pointing at a window, activate it after” X “tenths of a second”
程序中设置,暂无。

5..Exists(Timeout)
用的是毫秒作为单位.

6. .WaitProperty(x, y, Timeout)
用的是毫秒作为单位.

7.Wait seconds [, milliseconds]

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

 

 

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



TAG:

lamuda的个人空间 引用 删除 lamuda   /   2010-06-15 20:48:34
嗯,我也认为是秒
引用 删除 鹭岛   /   2010-06-14 09:25:26
Exists(Timeout)用的是毫秒作为单位.

错了吧。。。exist应该是秒为单位的!
 

评分:0

我来说两句

Open Toolbar