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

I have an issue of launch script for launching QTP application.

I want to write code for the application if it is open it should be closed and if it is closed it should be opened.
Please help me to solve this problem
Thanks in advance Smile

1. This is the code to launch the QTP Application
Code:
Dim qtp_app
Set qtp_app = CreateObject("quicktest.application")
    If qtp_app.launch = false Then
      qtp_app.quit
      qtp_app.launch
      qtp_app.new
      qtp_app.visible=true
    End if
It is working

2. This is the code to close the qtp application
Code:
Dim qtp_app
Set qtp_app = CreateObject("quicktest.application")
    If qtp_app.visible = true Then
      qtp_app.quit
      Set qtp_app=nothing
    End if
It is working

But when we are giving the condition for launch and close in the single file it is not working
Code:
Dim qtp_app
Set qtp_app = CreateObject("quicktest.application")
    If qtp_app.visible = true Then
      qtp_app.quit
      Set qtp_app=nothing
    End if
  If qtp_app.launch = false Then
      qtp_app.quit
      qtp_app.launch
      qtp_app.new
      qtp_app.visible=true
    End if

what is the solution ?
Reply


Messages In This Thread
launching and Closing QTP Application by using single file - by vnskumar - 07-25-2010, 01:36 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,152 08-28-2014, 06:39 PM
Last Post: dplank
  How to convert a single dimension array to two dimensional array venkatesh9032 3 5,514 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: 2 Guest(s)