Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Relative path
#2
Solved: 12 Years, 10 Months, 3 Weeks ago
Use Pathfinder.locate utility in QTP.

In your case, Pathfinder.locate(".") will give you the path of the script which is "C:\Tests\Automation\TestScripts\Login"

if you use Pathfinder.locate("..\..\"), the path would be "C:\Tests\Automation".

To append the path of the environment variable,

RelPath = Pathfinder.locate("..\..\")
Envvarpath = Relpath & "\Data\Environment.xml"

Hope this helps.

Let me know if you need more help.

Thanks,
Elango
Reply


Messages In This Thread
Relative path - by sams001 - 12-04-2012, 11:14 PM
RE: Relative path - by elango87 - 12-06-2012, 04:21 PM
RE: Relative path - by sams001 - 12-06-2012, 07:58 PM
RE: Relative path - by sams001 - 12-12-2012, 06:19 PM
RE: Relative path - by supputuri - 12-11-2012, 12:13 AM
RE: Relative path - by elango87 - 12-13-2012, 05:50 PM
RE: Relative path - by sams001 - 12-13-2012, 09:07 PM
RE: Relative path - by elango87 - 12-14-2012, 11:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to get relative path by using testdir environment variable Sathyaprasad 1 2,377 11-30-2017, 02:21 AM
Last Post: supputuri
  Path of Flight reservation Window is not recorded in HP UFT 12.52 version mailtokopalverma@gmail.com 1 3,189 04-01-2016, 05:34 PM
Last Post: vinod123
  X path Identification vasavi.vasavi 1 3,498 07-29-2015, 10:44 AM
Last Post: kbhargava505
  environment variable path for qc automation2012 0 3,177 01-18-2015, 08:18 AM
Last Post: automation2012
  Change Object Repository File Path for ExternalActions MasterChief 1 5,125 11-13-2014, 06:05 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)