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
You could try to manipulate the headers directly like this:
First when you start, you have to enable Selenium ti manipulate headers:
selenium.start("addCustomRequestHeader=true");
Then you have to use some basic encoding and header manipulation like this:
String authHeader = "";
try {
BASE64Encoder coder = new BASE64Encoder();
authHeader = coder.encode("developers:Str492ight".getBytes());
}
catch (Exception e)
{
e.printStackTrace();
}
setUpSelenium();
startSelenium();
selenium.addCustomRequestHeader("Authorization", "Basic " + authHeader);
selenium.open("/");
selenium.waitForPageToLoad("10000");
The space after Basic is necessary. This is how a basic HTTP authentication header looks like..
Further more you could use some Http Watchers to see if the request contains your auth request.
Either use Wireshark, or better is Fiddler or Charles Proxy.
Hope that helped. Gergely.