1

Related to this question: How to handle login pop up window using Selenium WebDriver?

url I am using:

https://username:password@url.com

When I try to enter the url containing username and password in IE 11, it gives an error.

Windows cannot find '...url...'. Check the spelling and try again.

I tried the other methods and none of them is working, but that is because the login pop up is a Windows Security window and not normal js alert. Here I asked that question: https://sqa.stackexchange.com/questions/35002/how-to-handle-password-alert-pop-up-windows-security-on-ie

This method is giving a different error and I am curious as to why this is the case. Some permission missing that allows the url to contain credentials?

Gaurav Kumar
  • 221
  • 3
  • 14

1 Answers1

1

Found an answer: https://stackoverflow.com/a/30372668

I've just encountered that problem myself. For me, the problem was that my application uses HTTP Basic Authentication, and that I was attempting to set the username/password combination via the page URL, like this: http://username:password@host/path

Problem is by default IE doesn't allow you to set the username and password this way (it's a security feature), and that causes the error above.

To fix this, I had to add a registry value in regedit. In the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE add a new DWORD value with the name iexplore.exe and the value 0, as described in this other answer https://stackoverflow.com/a/23519791/80779

And this: Basic authentication with Selenium in Internet Explorer 10

Gaurav Kumar
  • 221
  • 3
  • 14