Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
doubts
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
what is use of option explicitly?
How to close Entire Qtp window through script?
There is 10 windows open in browser, How to close the all windows expect 1 window?
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
1. Option explicit means you have to declare variable before you using.
2. You can use the below code to close QTP
Code:
Private Function CloseQTP        
    Set objWMIService = GetObject(“winmgmts:\\.\root\CIMV2″)    
    Set colProcess = objWMIService.ExecQuery (“Select * from Win32_Process Where Name = ‘QTPro.exe’”)    
    For Each objProcess in colProcess                      
        objProcess.Terminate()          
    Next          
    Set objWMIService = Nothing        
    Set colProcess = Nothing
End Function

3. find the answer in the following link
http://relevantcodes.com/qtp-closing-mul...r-windows/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Doubts in automatino framewrok pkdhake 2 2,073 04-12-2013, 09:35 AM
Last Post: pkdhake
  QTP Doubts Forrest Gump 4 4,603 09-06-2011, 02:44 PM
Last Post: Ankesh
MyBB Doble click doubts....... nileshpatil2521987 1 2,596 07-29-2010, 07:50 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)