One of my webdriver testcases does a file upload to the website, in order to test that attachments can be added to message posts. This is implemented easily enough with a single line of code:
The problem is how to define, as part of the test data parameters, a string which represents a known sample file available for upload. I developed the testcase on my windows 7 PC, and the sample Chrysanthemum.jpg file is pretty much guaranteed to exist in anybody's Pictures folder (assuming they're running Windows 7), so I've got this code defining the test data:
fullFilePath = System.getenv("PUBLIC") + "\\Pictures\\Sample Pictures\\Chrysanthemum.jpg";
My problem is that now I now need to start running this test on other OSes which I'm not as familiar with: Android, OSX, iOS, Windows 8, Windows 10. Does anybody know if there are similar 'sample' files which I can rely on in those platforms?