Tuesday, May 24, 2011

How do you close the Task Manager through QTP?

How do you close the Task Manager through QTP?

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

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

No comments:

Post a Comment