How to Specify download location?

Hi B) ,

I want to specify the download location Chromedriver and save it, but what should I do?

String downloadPath = "C:\\test"
Map<String, Object> chromePrefs = new HashMap<String, Object>()chromePrefs.put("download.default_directory", downloadPath)chromePrefs.put("download.prompt_for_download", false)System.setProperty("webdriver.chrome.driver", DriverFactory.chromeDriverPath)ChromeOptions options = new ChromeOptions()options.setExperimentalOption("prefs", chromePrefs)WebDriver driver = new ChromeDriver(options)
DriverFactory.changeWebDriver(driver)

2 Likes

Thank you for reply.

tell me where to write… :s

You can put it directly in your test case (switch to Script mode in Katalon)

20180904-085104.jpg

1 Like

Thank you :smiley: :smiley: