I have a Node.js file that looks like this:
var webdriver = require('selenium-webdriver');
var chrome = require('selenium-webdriver/chrome');
var driver = new webdriver.Builder()
.withCapabilities(webdriver.Capabilities.chrome())
.setChromeOptions(new chrome.Options().setUserPreferences(
{ "download.default_directory": dir.join(__dirname, 'extensions')}
))
.build();
driver.get("[URL to Download]")
When I run this, it downloads the item I want, but chrome warns that the file might not be safe:
Is there Any way to automatically accept the download or click continue?