Storing and Using Test Files from Project Folder
Posted: Wed Mar 14, 2018 8:23 pm
I have been searching the forum for a while but haven't been able to find the solution to my problem. Hopefully I can get the answers I need by asking directly.
I have a test that involves logging into an application and uploading a PDF file. I have the PDF file stored in the solution folder, but I run/work on this solution from multiple locations, and each time I have to update the file location to be entered in the application to upload the file. Is there a way to have the path to test file always be the same? I've seen some workarounds that use user code to get the path to the test executable directory - is that still the way to do it? If so, could someone provide a little more explanation of how it's done?
Thanks!
I have a test that involves logging into an application and uploading a PDF file. I have the PDF file stored in the solution folder, but I run/work on this solution from multiple locations, and each time I have to update the file location to be entered in the application to upload the file. Is there a way to have the path to test file always be the same? I've seen some workarounds that use user code to get the path to the test executable directory - is that still the way to do it? If so, could someone provide a little more explanation of how it's done?
Thanks!