I'm trying to set download location for Chrome browser but I'm stuck.
const webdriver = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const chromeOptions = new chrome.Options();
chromeOptions.set('download.default_directory', __dirname + '/download');
const builder = await new Builder()
.forBrowser('chrome')
.setChromeOptions(chromeOptions)
.build();
What am I doing wrong or what is the correct method to pass my own download folder?
Many thanks!!