1

I'm using Edge for automated tests with selenium-webdriver. I have faced an issue which prevents downloading of xml files. Error message

Do you have any ideas how can I switch off Microsoft Defender SmartScreen when starting Edge browser? For chrome browser it can be done by setting option prefs.put("safebrowsing.enabled", false);. Is there anything similar for Edge?

  • Hi, how about the issue? Is [my answer](https://stackoverflow.com/questions/68767246/how-can-i-switch-off-microsoft-defender-smartscreen-using-selenium-webdriver-to/68797297#68797297) below helpful to deal with the issue? – Yu Zhou Aug 18 '21 at 02:59
  • Hi! Thanks for the answer! Yes, it works for local execution, but for execution on remote server under linux system it is not possible to use this workaround in my case :) – Elchin Iusubov Aug 18 '21 at 06:30

1 Answers1

0

The error message pop up is not controlled by Microsoft Defender SmartScreen so there's no use to switch it off.

I know that you want to control it with Selenium but there's no Edge option that can override the warning in Selenium. The solutions in other threads are for old versions of browsers. safe browsing is now the default behavior so it won't work either. There's not much Selenium can do with the warning.

If you want to get rid of the warning when downloading xml files, you can only set this group policy first, then use Selenium to automate. For more information, you can also refer to this thread. In the accepted answer of the thread, it uses PowerShell script to update Windows Registry to set the group policy, you can also use it as a workaround.

Yu Zhou
  • 11,532
  • 1
  • 8
  • 22