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

how to get column count in datatable

3 Answers  


what is the difference between link and hyperlink?

2 Answers  


How do you return a value for an array.

1 Answers  


In QTP what is the difference between Step-in, Step-out, Step-over ?

3 Answers   CTS,


How to Import data from a ".xls" file to Data table during Runtime.

1 Answers  






Can we call a parameter from an action to other action?

4 Answers  


What is the keyword view and expert view in qtp?

0 Answers  


IF I SET THE VIRTUAL OBJECT AFTER THAT MAXIMIZE THE APPLICATION THEN QTP SENT ERROR OR EXECUTE SUCCESSFULLY? WHY ?

2 Answers   CTC, Infosys,


How to extract the data in the below scenario and dump it in the excel? Link1 Link2 Link3 Link4 numberlink1 text text text numberlink2 text text text numberlink3 text text text numberlink4 text text text So, Here is my question? -- It is a matrix but is not a web table(QTP does not recognize it as a web table) -- Link1, link2 and link3 are links under which text is available -- numberlink1 to numberlink4 are again LINKS -- All the others displayed are text only I want to extract the data in the above scenario and dump it into an excel in the same scenario as it is displayed above. Kindly help.. Thank you

0 Answers  


Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks

0 Answers  


Please anybody can tell the where can i get the information about pharma and bank testing, i put the pharma&bank projects in my resume, so i dont know what to tell about them, so where can i get the information and what we test for these, i need domain information, what r the screen we test?

0 Answers  


-->IF two TextBOxes are there in a "Form". -->A table contains some records which contains usernames & password.. -->What is the script we need to write using Descriptive programming concept...in QTP (simply DATA DRIVEN TEST SCRIPT OF QTP)?

3 Answers   CTS,


Categories