Is there a way in QTP by which I can access the currently active window/objects details.
Write a generic function called StartApp(sAppName,sTitle)
I need to execute an application and then verify whether it has the specified title or not.
The problem is I might get an Dialog or a window or an swfwindow etc.
I have one option of using FindWindowA method of windows api. But I was thinking of some thing available in QTP itself.
Mansoor QTP Inside Out
hi samnsoor ,
you can use the window api of "GetTopWindow"
Try below code, it will collect the desktop's available windows titles..
<font class="small">Code:</font><hr /><pre>Set oShell = CreateObject("Shell.Application")
For each oWindow in oShell.Windows
i have never seen bugs sleeping
you can use Prince3105's reply to judge whether your desired application is on the desktop or not and then activate it if it eists.