Page 1 of 1

How to set Relative Path in Global Variables

Posted: Thu Oct 13, 2011 9:06 pm
by LPG
I have set the path to the application under test as a Global Variable in my test suite. Not everyone will call their working directory the same thing, so my absolute path is not an ideal solution.

How can I make this a relative path?

I assume I need to set the "root" directory where it should start from, but where do I do this? Also, how would I refer to it in my Global Variable settings?

Thanks!

Re: How to set Relative Path in Global Variables

Posted: Mon Oct 17, 2011 8:09 am
by Support Team
Hi,

to set a root directory, from which you can start a application with relative path, you have to add some code.
You can do this by adding attached user code module to your projct, which sets the current directory to the values helt in a global parameter.
You have to add this global parameter holding the absolute path of your root directory and bind it with the variable "dir" of the user code module.

Regards,
Tobias
Support Team