I am using WebDriver (Selenium2) with Java on linux. I am using WebDriver to auto fill form and submit it. I am facing problem with htaccess sites i.e., I am not able to access htaccess site through WebDriver.

Note that on Internet Explorer this won't work, since Microsoft has disabled usernames/passwords in URLs in IE. However, you can add that functionality back in by modifying your registry, as described in the linked KB article. Set an "iexplore.exe" DWORD to 0 in HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE.

If you don't want to modify the registry yourself, you can always just use Selenium Remote Control, which automatically sets that that registry key for you as of version 0.9.2.

I tried on mozilla and its working fine. Thanks for the help.
–
sunilJan 19 '10 at 4:53

@Bozho in my machine registry under HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl there is no FEATURE_HTTP_USERNAME_PASSWORD_DISABLE folder present . there is only 2 folder " FEATURE_BROWSER_EMULATION " and " FEATURE_LOCALMACHINE_LOCKDOWN" . can you suggest any wayout for me I am using 32 bit windows 7 operating system.
–
JohnSep 29 '13 at 6:21

I dont think that would work for me since I use SauceLabs.
–
djangofanApr 25 '14 at 20:32

Until there is full support for this across browsers for WebDriver (or Selenium), alternate option is to integrate w/ desktop GUI automation tools, where the desktop GUI tool will automate the HTTP authentication part. You can probably find some examples for this or file downloads, uploads if you google for things like "Selenium AutoIt", etc.

For a cross platform solution, replace AutoIt with Sikuli or something similar.

That will not work via Selenium grid though.
–
djangofanApr 25 '14 at 20:37

That's not entirely true, I blogged about theoretical solutions to integrate 3rd party tools with Grid. In fact, Grid is actually extendable for 3rd party integration. Unfortunately, few people have the initiative or skill to do it and share the results. See my blog post: autumnator.wordpress.com/2011/12/22/…
–
DavidApr 27 '14 at 4:44

The solution from the Selenium FAQ does not work - FireFox now adds a prompt to confirm that the user means to authenticate which does not have an obvous-to-me Selenium task.

"You are about to log in to the site "my.domain.com" with the username "myuser"

The cheapest solution is to manually enter the credentials once with the browser profile that the selenium session uses and let the browser save them. (I did this in mid-test)
Also added the profile integer value network.http.phishy-userpass-length;255

This other question pointed me at the way to do it programmatically, i.e. using Selenium 2