Selenium: Allow Basic Auth in IE11

IE Basic Auth Problem

When using Selenium WebDriver with IE 8 to 11 to navigate to an application that uses basic authentication1 Windows/IE security settings blocks access2.

A Simple Solution

The easiest way to get this to work again is to edit the registry to enable this behaviour.

  • Run regedit.exe
  • Create the following keys, set both to a DWORD with a value of 0:
    • “iexplore.exe” and
    • “explorer.exe”
  • In these locations (if they exist for your version of Windows):

The line with SOFTWARE\Wow6432Node is for 64-bit versions of Windows. I’ve tested this on Windows Server 2012 R2. I’d be grateful if you could take the time to let me know if this didn’t work and what you needed to do instead, such that I may improve this for others.

  1. e.g. http://user:[email protected]/path The username and password as part of the URL prevents the Windows prompt for credentials which Selenium can’t interact with [return]
  2. It can be used to trick the user into visiting bad links e.g. http://this-is-your-banking-website.com__________:[email protected] [return]