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

Please explain how to open with notepad of saved html file by right click option using QTP

1 Answers  


What is difference between function and procedure?

41 Answers   HCL, IBM, iGate, Infosys, TCS, Veritas, Wipro,


What is the use of "Step Generator" in QTP??for what purpose we are using??explain with an example

2 Answers  


How do you return a value from a function

1 Answers  


difference between do while and do until ?

3 Answers   HCL,






What is the main differece between QTP 9.0 and 9.2

1 Answers   VeriSign,


Hi, I Install QTP 9.2 in windows Vista. but it is not supporting IE. it is supporting only windows based application. could I change any setting in Vista for supporting IE.. ?? thanks in advance...

2 Answers  


Actually what is Quality center..is it Test Director or some other tool..Anybody can expalain it in detail..Thanks in advance..

3 Answers   Sony,


I recorded a Web based Application running on JAVA and when I went to play them back a week later they didn't run. I noticed that the Browser was putting in a (Underscore and a Number) for each line so i re-recorded and noticed the Underscore line wasn't the same as what i recorded last week so any script I record today will not work next week because the browser settings or how QTP recognizes it keeps changing. This is the new line Browser("Bureau of Labor Statistics_4").Page("Bureau of Labor Statistics").JavaApplet("SurveyApplet").JavaList ("Select an Area").Select "U.S. city average" This is the old line 'Browser("Bureau of Labor Statistics_3").Page("Bureau of Labor Statistics").JavaApplet("SurveyApplet").JavaList ("Select an Area").Select "U.S. city average" Notice the Burearu of Labor Statistics_3 adn Burearu of Labor Statistics_4. Why does it change and how do I prevent it from changing.

5 Answers  


what type automation is fofollowed in the project?

1 Answers   Satyam,


what function you write to do database testing with the help of qtp?

0 Answers  


When do go for loop condition in test?

0 Answers  


Categories