How do you close the Task Manager through QTP?

Questions by ganesh kumar22

Showing Answers 1 - 3 of 3 Answers

Satyenjit Bagal

  • Mar 2nd, 2007
 

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  

  Was this answer useful?  Yes

mahesh.1986

  • Aug 22nd, 2012
 

First we need to identify the task manager and then close the program by 3 ways:
using CloseProcessByName
using CloseProcessById
CloseProcessByWndTitle methods we can close sny application.
Now we will use the 2nd method mentioned above:

Code
  1. span style="color: #ff0000;">"c:WindowsSystem32 askmgr.exe""title:=Windows Task Manager""title:=Windows Task Manager""title:=Windows Task Manager""process ID"

  Was this answer useful?  Yes

Lingesh Mukilan

  • Aug 23rd, 2012
 

QTP Scripting is easy way.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions