QTP Timeout Settings

發表于:2007-06-20來源:作者:點擊數: 標簽:qtp
具體設置方法: Test Settings, Run Tab, the “Object Synchronization timeout:” setting. 請注意在8.x版本中單位是毫秒,而在9.x 就變成秒了。 程序中設置: Setting(“DefaultTimeout”) [=milliseconds] 2. Browser Navigation Timeout 幫助里這樣定義

具體設置方法: 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關于時間的設置的,很多概念自己也不算清楚,希望和大家一起在學習中進步。

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97