用Schedule定時運行QTP腳本

發表于:2008-05-28來源:作者:點擊數: 標簽:
創建一個.vbs,在控制面板的Schedule里面定義自己的task就好 vbs的腳本如下: Dim qtApp 'As QuickTest.Application ' Declare the Application object variable Dim qtTest 'As QuickTest.Test ' Declare a Test object variable Dim qtResultsOpt 'As Quic

創建一個.vbs,在控制面板的Schedule里面定義自己的task就好

vbs的腳本如下:



Dim qtApp 'As QuickTest.Application ' Declare the Application object variable

Dim qtTest 'As QuickTest.Test ' Declare a Test object variable

Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object

qtApp.Launch ' Start QuickTest

qtApp.Visible = True ' Make the QuickTest application visible

' Set QuickTest run options

qtApp.Options.Run.ImageCaptureForTestResults = "OnError"

qtApp.Options.Run.RunMode = "Fast"

qtApp.Open "C:\ Your Test Path Here", True ' Open the test in read-only mode

' set run settings for the test

Set qtTest = qtApp.Test

qtTest.Settings.Run.OnError = "NextStep" ' Instruct QuickTest to perform next step when error oclearcase/" target="_blank" >ccurs

Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object

qtResultsOpt.ResultsLocation = "C:\Your Results Path Here" ' Set the results location

qtTest.Run ' Run the test

'qtTest.Close ' Close the test

Set qtResultsOpt = Nothing ' Release the Run Results Options object

Set qtTest = Nothing ' Release the Test object

Set qtApp = Nothing ' Release the Application object

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

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