how do close the task manager through QTP?

Answers were Sorted based on User's Feedback



how do close the task manager through QTP?..

Answer / deven mehta

First you should add the Task Manager dialog box in the
object repository. This is not a modal dialog box so you
can add it to repository easily.Then use following simple
code.

If Dialog("Windows Task Manager").Exist Then
Dialog("Windows Task Manager").Close
Reporter.ReportEvent micPass "Task Manager" "Successfully
closed task
manager"
Else
Reporter.ReportEvent micFail "Task Manager" "Task Manager
is not open"
End If

Is This Answer Correct ?    1 Yes 0 No

how do close the task manager through QTP?..

Answer / rajni singh

Ucan use below function to kill excel object from task
manager:

'===========================================================
====================
Sub KillExcel ()

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer
& "\root\cimv2")

Set colProcesses = objWMIService.ExecQuery ("Select * from
Win32_Process Where Name ='Excel.exe'")

For Each objProcess in colProcesses

objProcess.Terminate()

Next

End Sub
'===========================================================
=====================
call KillExcel()

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji

0 Answers  


How to "Turn Off" QTP results after running a Script?

3 Answers   Crea,


How to Analyze the Checpoint results with Standard Checpoint ?

1 Answers  


what is vss and cvs what is main difference b/w these two

3 Answers  


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..

0 Answers  






i need the licence key for QTP V9.5 can anyone help me on getting this?

140 Answers  


What is Regular Expressions?

2 Answers  


What type of VB script u had done in expert view?

1 Answers  


what is the use of Text output value in Qtp?

2 Answers  


what is a file system object in QTP

7 Answers  


What is the basic concept of quicktest professional?

0 Answers  


I have 2 Environment variable which holds int. I called into my test and addedup. but output is concatenating the values instead of Sum. Ex. Envi("a")= 10, Envi("b") = 20, c= Envi("a")+ Envi("b"). msgbox c ( Ans.1020). How to overcome this pblm? I used the add fn also..

3 Answers   BirlaSoft,


Categories