How to minimize the QTP main page while the script is running so that QTP will temporary lost focus.
I have an automated test case that need to launch the application from desktop, but the script always return failure due to the QTP main page is still focusing so the tool can not find the short-cut icon on desktop to launch the application, every time I need to minimize the main page manually only then the script can be run successfully. Therefore I added few line of codes at the beginning of the scripts so that the QTP main page will be minimized itself after I run it.
Here are the codes that may be useful for you.
Set qtApp = getObject("","QuickTest.Application") qtApp.WindowState = "Minimized" Set qtApp = Nothing