I am new to QTP. I want to automate a .net application. I record the starting(opening) of the application by double clicking on the application icon on the desktop. I wonder how to open an application in case if its icon is not on the desktop. I want to know whether there is any function to start an application in QTP instead of double clicking on the application icon. If so please let me know.
Thank u very much for your help. What if the recorded script has to be run on other persons system? Path of exe file in my system may be different than other persons. what to do in such case.
That is a pretty good logic but some things need to be set before test case execution and this comes under setting the Environment. Well if you are frequently using such cases where the exe path changes then i suggest to make it a parameter and access the .Exe file path from a excel file. Then you will just need to change the path in excel file and things will work for you.
As the path of exe file changes from system to system, the following line can be used which will open the internet browser on any system without any prior settings and from there you can navigate to the required URL.
If the recorded script has to be run on other persons system, then not only your exe file path changes but your datasheet path, script path also gets change. For this issue we are getting the path as input from the user, and then we will set the path and run the script accordingly.
Thank you all. I tried SystemUtil.Run it worked fine. I have also tried Test->Record and Run settings->Windows Application->selected Record and Run on these applications(opened on session start) and added the path of my application. This also opened the application. I want to know what are the advantages of both and the difference between them.