I need to use relative pathing with the Windows api calls in silktest. It is apparent that when using these calls that silk starts at the install directory of silktest. I need relative pathing to start in the .t file or the .inc file that I am working in. If you use the "use" command to include an .inc file it works perfectly. Some examples of API's used are SYS_FileExist() and SYS_Execute()
I'll have to see how SetDir() works. However, since it's one of the SYS calls if you use a relative path won't it be based off of the install directory. In my case it is "c:\Program Files\segue" and my files are in "c:\segue_files". The biggest reason for this is if I wanted to have multiple copies of the source on my computer or if another user wants take the source and they put it in a different directory. I guess the bottom line here for me is that if I use the "use" Command and the relative pathing is relitive to the file that I call it in I expect that it should be the same with the SYS calls
You are thinking in terms of traditional programming. Remember that your tests can easily be run on a remote machine that has no idea how the source code is laid out on the machine you are coding with. Just use an absolute path with SYS_SetDir().
Chris R Mead
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
Another way that this can be done is to know the directory of the file that you are working in. Then setdir can be ran and then relative pathing can be used from there. Is there a way, that any one knows of, to get the directory that the file that you working in is in? Please let me know, thanks.