Change Download Path


I am doing a test that downloads the file, reads it and then deletes it using the following code:

WebUI.waitForElementClickable(findTestObject(‘/button_download2’), 2)‘/button_download2’))


File fileReport = new File(‘C:/Users/Downloads/report.csv’)

String data = FileUtils.readFileToString(fileReport)

boolean fileSuccessfullyDd = new File(‘C:/Users/Downloads/report_flux.csv’).delete()

I also updated the Desired Capability

How can I change the download path ?

ANY Help Please !!

1 Like

Hi @fzacraoui, Please see this post: Finding user's "Downloads" folder & Katalon project's "Data Files" folder relative to the project folder - #5 by Dave_Evers


Thank you for your reply.
This code returns the path of the project as well as the path in which the download file would be put.
But the file is always downloaded on the default path C:/Downloads and not the Data Files file.
Is there a modification to be made at the level of the setting> Desired Capabilities?

1 Like

for this , you need to change your desired path from chrome browser-> setting->Downloads


It’s work with this

1 Like