Selenium: Allow Basic Auth in IE11
IE Basic Auth Problem
A Simple Solution
The easiest way to get this to work again is to edit the registry to enable this behaviour.
- Create the following keys, set both to a
DWORDwith a value of
- “iexplore.exe” and
- In these locations (if they exist for your version of Windows):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE
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.
http://user:password@hostname/pathThe username and password as part of the URL prevents the Windows prompt for credentials which Selenium can’t interact with [return]
- It can be used to trick the user into visiting bad links e.g.