How to make a script location independent in UFT or QTP?

0
120
Spread the love
  • 16
  • 23
  • 27
  • 23
  •  
  •  
  •  
  • 19
  •  
  •  
    108
    Shares

Location Independent
Location Independent

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..

now go to

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.

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 16
  • 23
  • 27
  • 23
  •  
  •  
  •  
  • 19
  •  
  •  
    108
    Shares
READ  How to Stop Screensaver or Screenlock in UFT or QTP via code?

LEAVE A REPLY

Please enter your comment!
Please enter your name here