relative path
relative path
Could someone tell me how to use relative path to file in ranorex?
Re: relative path
Hi,
Can you explain in detail, what do you want to achieve?
If you want to include files into Ranorex, follow these steps. First of all, you have to include the file into the project folder (in my case an excel file). Afterwards, right-click the file in Ranorex Studio and click "Include in project". When the file is included, open the properties and set "Copy to output directory" to "Always".
See my attached screenshots, to comprehend the steps which have been made.
regards,
Can you explain in detail, what do you want to achieve?
If you want to include files into Ranorex, follow these steps. First of all, you have to include the file into the project folder (in my case an excel file). Afterwards, right-click the file in Ranorex Studio and click "Include in project". When the file is included, open the properties and set "Copy to output directory" to "Always".
See my attached screenshots, to comprehend the steps which have been made.
regards,
You do not have the required permissions to view the files attached to this post.
Re: relative path
Thanks. it is ussefull to me.
i mean that i have string = path to file witch is in currently project.
for example file in directory C:/Program file/project/filesForTesting/name.txt
i think that instead full path to file i can use short path like /filesForTesting/name.txt
i mean that i have string = path to file witch is in currently project.
for example file in directory C:/Program file/project/filesForTesting/name.txt
i think that instead full path to file i can use short path like /filesForTesting/name.txt
Re: relative path
Hi,
You can use this code, to return the actual working directory, from which is started your test:
Then simply add whatever you want at the end of found path (e.g. like this):
or with variable, containing relative path to file:
You can use this code, to return the actual working directory, from which is started your test:
Code: Select all
string getActualDir = TestSuite.WorkingDirectory.ToString();
Code: Select all
string getDataDir = getActualDir + "\\Data\\file.txt";
Code: Select all
string getDataDir = getActualDir + relPathToFile;
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: relative path
1. For csv and xls files relative path is recognized by Ranorex:
e.g. if file name = \mdbFiles\SNWX-Produkte.mdb
Is short path (relative path) for Access.mdb file possible at all?
How to achieve that?
thank you
2. where for mdb files only physical path is recognized by Ranorex:
Relative path for connection string brings errors:e.g. if file name = \mdbFiles\SNWX-Produkte.mdb
Is short path (relative path) for Access.mdb file possible at all?
How to achieve that?
thank you
You do not have the required permissions to view the files attached to this post.