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.

Update (Aug 2018)

See this discussion for Windows 10.

Let Me Know

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:password@hostname/path The username and password as part of the URL prevents the Windows prompt for credentials which Selenium can’t interact with ↩︎

  2. It can be used to trick the user into visiting bad links e.g. ↩︎