Reputation: 31
I downloaded a file in one of my local folder(say CSV_downloads
) using selenium and its working fine,but when I am pushing same code to Git and running it in jenkins
,though that folder(CSV_downloads
) exists in jenkins
workspace(CSV_downloads
) its not downloading csv
to that particular folder(CSV_downloads
) in jenkins
.
Upvotes: 1
Views: 896
Reputation: 3927
If you use a hard coded location like C:\CSV_downloads
then it will not be downloaded into jenkins
folder. So you have to see the folder locations in local and remote machines.
Try to use relative paths like System.getProperty("user.dir") +"//folders.."
where System.getProperty("user.dir")
is your project folder.
also if the folder is not there then try to create directory like folderName.mkdirs();
Upvotes: 1