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

.qfl extension for which file? where vl use it

1 Answers   iFlex,


If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?

0 Answers  


abt filter function if iam using below two statments its ok My = Array ("Apples","Oranges", "Apricots") MyResult = Filter(My, "Oran") if i use msgbox MyResult it shows type mismatch plz help me

2 Answers  


one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.

0 Answers   Mindlance,


Can abody explain me Send keys concept

1 Answers   Cap Gemini,






Can we Run the Tests developed in QTP 8.2 in advanced versions like 9.0, 9.1, 9.2...etc.,

3 Answers   ADP,


iam working in QTP for 2+ of exp if i attend the interview what r questions asked in perfomence testing{loadrunner} ? pls any one can say answer to this question?

0 Answers   Infosys,


we r conduction testing on a project USING QTP, regarding that project the object repository is full ? Till that project having objects that r not recognised by repository, then what wil you do? How we wil recogine remailning objects? Is it possible to maintain another shared(or)peraction repository? what is the maximum capcity of object repository? How the technical people decide this much object repository is enoughf for this project?

7 Answers   AppLabs, CGI,


How to create a standard checkpoint ?

0 Answers  


how to retrieve the xml file data through qtp. can anybody send script for this..

3 Answers   Synechron,


Can a function return a dictionary object?

2 Answers   CG, Semantic Space,


write qtp descriptive programming to activate multiple notepads? please urgent friends

1 Answers   TCS,


Categories