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
Well, you can make you use of the Sikuli script to handle this Firefox Authentication popup in Windows as well as in Linux environment.
for i in range (100):
while exists(Pattern("Authentlcatl.png").similar(0.99)):
print("Found Authentication Popup")
wait(2)
type("admin" + Key.TAB)
type("admin" + Key.ENTER)
To Trigger the Sikuli Script:
String[] lincmd = { "bash", "-c", "sudo java -jar Sikuli-X/Sikuli-IDE/sikuli-script.jar Sikuli-X/Sikuli-IDE/new1.sikuli/" };
java.lang.Runtime.getRuntime().exec(lincmd);
To Terminate the Sikuli Script:
String[] lincmd = { "bash", "-c", "sudo kill $(ps aux | grep '[s]ikuli' | awk '{print $2}')" };
java.lang.Runtime.getRuntime().exec(lincmd);
After triggering the Sikuli script from Java code,Sikuli script will run as another process separately,so finally in the Java code terminating the Sikuli script.
So whenever the popup appears in the screen,Sikuli script will handle.