I used the below code to open QTP through VBscript?But i can
unable to Invoke QTP...PLZ help me with the correct code to
invoke QTP through VBS with description of the code aswell.

Dim qtApp 'As QuickTest.Application
'Declare the Application object variable
Dim qtTest 'As QuickTest.Test
'Declare a Test object variable
Dim qtResultsOpt 'Declare a Run Results Options object
variable
Set qtApp = CreateObject("QuickTest.Application")
'Create the Application object
qtApp.Launch 'Start QuickTest
qtApp.Visible = False 'Make the QuickTest application
visible
qtApp.Open "C:\form", True
'Open the test in read-only mode
'set run settings for the test
Set qtTest = qtApp.Test
qtTest.Run 'Run the test
'WScript.StdOut.Write "Status is: " &
qtTest.LastRunResults.Status
'Check the results of the test run
qtTest.Close 'Close the test
qtApp.quit 'Close QuickTest Pro
Set qtResultsOpt = Nothing 'Release the Run Results Options
object
Set qtTest = Nothing 'Release the Test object
Set qtApp = Nothing 'Release the Application object



No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More QTP Interview Questions

In a page i have N number of links at a time i would like to open those links by using QTP?how to do that?

2 Answers   Wipro,


what is the exact Diff. Between Test and Component in QTP?

1 Answers  


HOW TO DO THE BATCH TESTING USING QTP?

2 Answers   Ordain Solutions,


Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.

0 Answers  


i have 100 manual test cases, how to automate from no 1. ols detail steps

1 Answers  






how to know no.of mails in our g mail by using vb-script

0 Answers   HP, Thinking Hats,


Can any body help me to write descriptive program to find a cell value (say 2 row, 3rd column) in a datatable which is creating dynamically and statically

0 Answers  


An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?

0 Answers  


i this is balaji from chennai i have 4 yrs exp in testing and my qualification is bsc computers i completed in correspondace in which companiies accept the correspondace plz let me know

1 Answers   Accenture,


What environment does qtp run in?

0 Answers  


What is the extension of script and object repository files in QTP?

9 Answers  


I used the below code to open QTP through VBscript?But i can unable to Invoke QTP...PLZ help me with the correct code to invoke QTP through VBS with description of the code aswell. Dim qtApp 'As QuickTest.Application 'Declare the Application object variable Dim qtTest 'As QuickTest.Test 'Declare a Test object variable Dim qtResultsOpt 'Declare a Run Results Options object variable Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object qtApp.Launch 'Start QuickTest qtApp.Visible = False 'Make the QuickTest application visible qtApp.Open "C:\form", True 'Open the test in read-only mode 'set run settings for the test Set qtTest = qtApp.Test qtTest.Run 'Run the test 'WScript.StdOut.Write "Status is: " & qtTest.LastRunResults.Status 'Check the results of the test run qtTest.Close 'Close the test qtApp.quit 'Close QuickTest Pro Set qtResultsOpt = Nothing 'Release the Run Results Options object Set qtTest = Nothing 'Release the Test object Set qtApp = Nothing 'Release the Application object

0 Answers   ADITI,


Categories