Header Ads

How to make a script drive/area independent in QTP

There is good question asked by Lakshmanan Durairajan ...
When my manager takes the scripts, 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?

if i make it more simple Lakshmanan....what is required is to take the test path dynamically i.e how to make a script drive/area independent?

lets do it..

now go to

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.
Powered by Blogger.