How to know where is the download folder when run in chrome headless via runtime engine?

Hello All,

  • I setup a virtual machine “Katalon windows” with runtime-engine and run with Azure pipeline.
  • I created a test case that click to button and download a excel file then verify it is downloaded successfully. The steps download file like below:

//Click on button to download excel file. it will auto download and save in default folder for chrome in C:/User/nttn/Downloads/
WebUI.click(findTestObject(‘Object Repository/Main_Menu/Job_Manager/Job_Element_Top’)
WebUI.delay(2)
WebUI.callTestCase(findTestCase(‘0_BuildingBlocks_Development/1_TC_Building_Blocks/Timing and Exceptions/WaitForLoadingMaskVanish’),[:], FailureHandling.STOP_ON_FAILURE)

//get the file path in Downloads folder( the file have downloaded)
def userDownloadDir = (System.getProperty(‘user.home’))
Path userDownloadPath = Paths.get(userDownloadDir).resolve(‘Downloads’)
Path actual_ExcelPath = userDownloadPath.resolve(actual_excelFileName)
println(actual_ExcelPath)

  • I have run this on Katalon Studio with Chrome, it works properly. But when I run in Katalon Windows pipeline it’s failed. I try to find where the file is downloaded in pipeline but no hope.
  • Does someone know how to setup of default folder when it save download file in pipeline is?
  • I have researched many topics relate to this issue but no suitable answer for my problem :frowning:.
  • Thanks a million in advance!

Hi,

Thank you for letting us know your problem. You can refer to Possible to change chrome default download path? to learn how to find / change default Chrome download path.

Hope this can help you. Thank you!