Below provided code works fine for me. Kindly implement the same.
Dim QTPObj,QTPTest
Set QTPObj=CreateObject("QuickTest.Application")
'Check if the application is not already Launched
If Not QTPObj.Launched then
QTPObj.Launch
End If
QTPObj.Visible=True
'Set QuickTest run options
QTPObj.Options.Run.ImageCaptureForTestResults = "OnError"
QTPObj.Options.Run.RunMode = "Fast"
QTPObj.Options.Run.ViewResults = True
QTPObj.Open "Path of the Driver Script", True
Set QTPTest=QTPObj.Test
QTPObj.Settings.Run.OnError = "NextStep" ' Instruct QuickTest to perform
next step when error occurs
'Save the test
QTPObj.Test.Save
QTPTest.Run 'Run the Test
QTPTest.Close 'Close the Test
QTPObj.Quit 'Quit the QTP Application
Set QTPTest= Nothing ' Release the Test object
Set QTPObj = Nothing ' Release the Application object
On Monday, September 28, 2015 at 4:16:49 PM UTC+5:30, L V Prasad wrote:
>
>
> Script 1:
> Set qtApp=CreateObject("QuickTest.Application")
> Set qtResultOpt=CreateObject("QuickTest.RunResultsOptions")
> qtResult.ResultsLocation="Path"
> qtApp.Launch
> qtApp.Visible=True
> qtApp.Open "driver script file path", True
> Set objTest=qtApp.Test
> qtApp.quit
> qtApp=Nothing
>
> objTest.Run qtResultOpt
> objTest=Nothing
>
>
> Script 2:
> Dim Test_path
> Dim qtApp
> Dim qtTest
> Set qtApp = CreateObject("QuickTest.Application")
> qtApp.Launch
> qtApp.Visible = True
> qtApp.Options.Run.RunMode = "Fast"
> qtApp.Options.Run.ViewResults = False
> qtApp.Open "path to execute my functional script"
> Set qtTest = qtApp.Test
> qtTest.Run
> qtTest.Close
> qtApp.quit
> Set qtTest = Nothing
> Set qtApp = Nothing
>
>
> in both the ways, im getting error as can not run the test. (attacheD)
>
> Can some one please help me to fix this issue.
>
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.