1

When try to download the xml through the selenium automation

HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("download.prompt_for_download", false);
chromePrefs.put("download.extensions_to_open", "application/xml");
chromePrefs.put("safebrowsing.enabled", true);
ChromeOptions options = new ChromeOptions();
options.addArguments("--safebrowsing-disable-download-protection");
options.addArguments("safebrowsing-disable-extension-blacklist");

Above code works for me. Try it also work for you

Shawn
  • 4,064
  • 2
  • 11
  • 23
  • Does this answer your question? [Can a website detect when you are using Selenium with chromedriver?](https://stackoverflow.com/questions/33225947/can-a-website-detect-when-you-are-using-selenium-with-chromedriver) – Mate Mrše Mar 06 '23 at 09:51
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 07 '23 at 05:19

0 Answers0