We have a batch of C#/Selenium/xUnit tests running in a CodeFresh pipeline. They all work well apart from 2, these try to upload test files. This works well when run local the code is
var filePath = Path.Combine(Environment.CurrentDirectory, @"Data\image1.jpg");
addFile.SendKeys(filePath);
The test files are stored here and they are set to 'Copy always' So they deploy ok but they do not seem to be making their way up to the build yaml file. Currently the steps are clone build push_image
The clone step is pulling from the correct repo and the data files exists there. Any ideas please?
Kev
solved it. Move the files to the project root and changed code -
var filePath = Path.Combine(Environment.CurrentDirectory, @"image1.jpg");
addFile.SendKeys(filePath);
Now all good, thanks for your help