I am building an integration test with Selenium and need to upload a file. I have the file included in my project but I need the full path to enter into the browser, to check if the browser upload system works.
How can I get the full path of a file that is included in my project? The test will be run on several different machines from different locations.
You don’t need to. Mark it as ‘Copy To Output Directory’ (right click in Solution Explorer and look at the props) and it will always be in your working dir and so you can use a relative path, e.g.: