How to make a script location independent in UFT or QTP?
When my manager takes the script, he wants to run them from his D drive. But I have written the scripts in such a way that it gets executed and stores the results in an Excel at C drive. To avoid this, I want to get the current folder path. How to do that?
The way to make script location neutral
what is required is to take the test path dynamically i.e how to make a script drive/area independent?
lets do it..
Script location independent UFT
this is the option by which QTP determines from here the script is running.
These are all environment variable.Now what you need to do is to take the path by using the environment variable.
now if yoy are using this command…i.e. environment of testpath…this will dynamically give you the path of the test running folder.
now configure your testing here I mean the path and the folder structure.your problem is solved.