How can I write relative path in setting->resources option?
I want that the test will "take" the resources from the function folder that under the main test folder.
for ex: c:\QTPTest\function\func.vbs
I want to move the QTPTest folder to any disk drive , so I should to put the function files in relative path...
Thanks a lot but... in every computer that run QTP I should do this...
There is no option to do like ..\ or somthing like that?
I want that the QTP will take it from the folder that the tests exist ther without to update Tools option...
I can't do this?
The tool> Options provide the folder location where QTP search for the files. The order is bottom to Top.
you need to provide path c:\QTPTest\function there. So it will be your base path. Keep the check box "Remind me to use relative paths when specifying a path to a resource " selected.
Go to File> setting> resource and provide func.vbs or ./func.vbs
Step 3: add verification in your script to see if the library has been called from intended location by the following way
findCurrentPath = Pathfinder.Locate("func.vbs")
Method2: Use Environment Variable
Environment.Value("RelativePath_Local") = "c:\QTPTest\function"