VBS RUN File >>>>>>>>>>
Dim ObjQTP
Dim ObjTest
Dim ObjResult
Set ObjQTP=CreateObject("QuickTest.Application") 'Create QTP Object
ObjQTP.Visible=True
If ObjQTP.Launched <> True Then
ObjQTP.Launch 'Launch QTP
End If
ObjQTP.Options.Run.CaptureForTestResults = "OnError" 'Tool -> Options -> Run Tab
ObjQTP.Options.Run.RunMode= "Fast"
ObjQTP.Options.Run.ViewResult = False
ObjQTP.Open "", True 'Open the test in read only mode
Set ObjTest=ObjQTP.Test
ObjTest.Settings.Run.OnError = "Next Step" 'File -> Settings -> Run
Set ObjResult = CreateObject("QuickTest.RunResultsOptions") 'Create the Run Results option object
ObjResult.ResultLocation = "" 'Set the result Location
ObjTest.Run ObjResult 'Run the test
'''''''''''''''' MsgBox ObjTest.LastRunResults.Status 'Run the test
ObjTest.Close 'Close the test
Set ObjResult = Nothing
Set ObjTest = Nothing
Set ObjQTP = Nothing
Dim ObjQTP
Dim ObjTest
Dim ObjResult
Set ObjQTP=CreateObject("QuickTest.Application") 'Create QTP Object
ObjQTP.Visible=True
If ObjQTP.Launched <> True Then
ObjQTP.Launch 'Launch QTP
End If
ObjQTP.Options.Run.CaptureForTestResults = "OnError" 'Tool -> Options -> Run Tab
ObjQTP.Options.Run.RunMode= "Fast"
ObjQTP.Options.Run.ViewResult = False
ObjQTP.Open "", True 'Open the test in read only mode
Set ObjTest=ObjQTP.Test
ObjTest.Settings.Run.OnError = "Next Step" 'File -> Settings -> Run
Set ObjResult = CreateObject("QuickTest.RunResultsOptions") 'Create the Run Results option object
ObjResult.ResultLocation = "" 'Set the result Location
ObjTest.Run ObjResult 'Run the test
'''''''''''''''' MsgBox ObjTest.LastRunResults.Status 'Run the test
ObjTest.Close 'Close the test
Set ObjResult = Nothing
Set ObjTest = Nothing
Set ObjQTP = Nothing
No comments:
Post a Comment