i’ve used
WebDriver driver= DriverFactory.getWebDriver();
driver.switchTo().alert().accept();
but not have success
i’ve used
WebDriver driver= DriverFactory.getWebDriver();
driver.switchTo().alert().accept();
but not have success
You cannot interact with the download window because the browser use native dialog which cannot be controlled with the webdriver.
My easy fix is to set browser default behaviour to download to automatically. When you click the link, it will download to a predefined directory.