user3177420
user3177420

Reputation: 41

How to handle Windows Authentication with Selenium Webdriver and Internet Explorer 10?

I have issues to get through the windows authentication when creating an automation test (C#) with Selenium Webdriver using the InternetExplorer Driver.

(When using Firefox it works to access https//username:[email protected] but not with Internet Explorer 10 (windows 7) )

I tried to update windows registry according to this article but it didnt work for IE10: http://aleetesting.blogspot.se/2011/10/selenium-webdriver-tips.html

Can any friendly person help me with a good solution how to get through Windows authentication using https//username:[email protected] in IE10?

Or does anyone have a better way to handle windows authentication issue with Selenium webdriver?

Best Regards Carl

Upvotes: 4

Views: 2993

Answers (2)

Peter
Peter

Reputation: 489

Just configure your system to allow windows authentication without prompting

Add your site into the Trusted Sites zone in Internet Properties and set "Automatic logon with current user name and password" in Local Intranet and Trusted Sites zones.

Here are the steps to configure this:

Search for the Internet Options tool on your system and launch it.

Click the 'Security tab > Trusted Sites icon', then click the 'Sites' button and enter the URL of your Trusted Site, then click Add. This should be the site under test.

Click 'Close' to close the Trusted Sites window.

Click on 'Security tab > Local intranet' then the 'Custom level...' button.

Scroll to the bottom and select the 'Automatic logon with current user name and password' option. It's under the 'Authentication > Logon' section.

Click OK to save the changes.

Repeat steps 6 and 7 for the 'Trusted Sites' zone also.

Click OK to save all the changes and close the Properties window.

Upvotes: 0

FrankyHollywood
FrankyHollywood

Reputation: 1773

In Windows 7 you can use the Credentials Manager to save the credentials for your site in the vault. The authentication now goes automatic.

Upvotes: 1

Related Questions