Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
launching and Closing QTP Application by using single file
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Vinay,

Here we go !!!

Check the below code for both conditions i.e Launching and Closing QTP by using single file/script.

Condition1: If we execute this script, if Launch=False and if QTP is Visible then it will closes QTP.

Condition2: If we execute the same script, if Launch=False and Not Visible then it would launch QTP.

Code:
Dim qtp_app
Set qtp_app = CreateObject("quicktest.application")
If (qtp_app.Launch=False) And (qtp_app.visible=True) Then
         qtp_app.quit
Else
     If (qtp_app.Launch=False) And (qtp_app.visible=False) Then
         qtp_app.launch
         qtp_app.visible=True        
    End if
End if
Set qtp_app=Nothing
Reply


Messages In This Thread
RE: launching and Closing QTP Application by using single file - by sreekanth chilam - 07-26-2010, 12:48 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SAP GUI gets hanged while closing the Windows Pop Up kathirvelnagaraj 0 5,527 10-23-2015, 06:47 PM
Last Post: kathirvelnagaraj
  UFT 12.02 Launching default home page sureshbl 0 3,300 06-01-2015, 02:15 AM
Last Post: sureshbl
  Launching .exe file with parameters magnifyingone 1 3,153 08-28-2014, 06:39 PM
Last Post: dplank
  How to convert a single dimension array to two dimensional array venkatesh9032 3 5,515 02-10-2014, 03:07 PM
Last Post: pranikgarg
  recovery scenario for closing a message box itself ashima 0 2,238 12-26-2013, 11:10 AM
Last Post: ashima

Forum Jump:


Users browsing this thread: 3 Guest(s)