I know that normally you can login to sites that require HTTP basic authentication with Selenium by passing the username and password in the URL, e.g.:
sele
Add a slash after the context root:
Instead of:
selenium.open("http://myusername:myuserpassword@mydomain.com/mypath");
use:
selenium.open("http://myusername:myuserpassword@mydomain.com/mypath/");
It makes all the difference of the world adding the slash at the end of the context root. Without the slash, the popup opens, with the slash it gets authenticated as expected.
Note, that this is not a selenium bug or whatnot, but a firefox thing. You can use your command line as well to see for yourself:
C:\Program Files\Mozilla Firefox>firefox http://myusername:myuserpassword@mydomain.com/mypath/
For me, it works even without settings the networks uris:
FirefoxProfile profile = new FirefoxProfile();
//profile.setPreference("network.automatic-ntlm-auth.trusted-uris", "mydomain.com");
//profile.setPreference("network.negotiate-auth.trusteduris", "mydomain.com");
WebDriver driver = new FirefoxDriver(profile);
driver.navigate().to("http://myusername:myuserpassword@mydomain.com/mypath/");
versions
Firefox 19.0,
selenium-java 2.31.0